11

How can I get the name of the Farm account ? I can see it listed in Get-SPManagedAccount, but do not see any properties on the SPManagedAccount objects to be able to dynamically filter by and determine if it's the farm administrator.

23

Use (Get-SPFarm).DefaultServiceAccount.Name should give you the Farm Account

6

This will give you the Farm Administrators:

$ca = [Microsoft.SharePoint.Administration.SPWebService]::AdministrationService.WebApplications | Select -First 1
$root = $ca.Sites["/"].RootWeb
$grp = $root.SiteGroups["Farm Administrators"]
$grp.Users

and

Get-SPManagedAccount will give you managed accounts

There should only be the farm admin common in these two groups

  • 2
    Another more "powershell'is" way to find CA Get-SPWebApplication -IncludeCentralAdministration | ? IsAdministrationWebApplication – Anders Rask Apr 10 '14 at 8:23
0

Alternatively to PowerShell, SharePoint Timer Service runs under farm account. Check it out and you get farm account

  • Do you have some steps to check SharePoint Timer Service, if so can you please share it as part of an answer. – Asad Refai Aug 19 '15 at 9:28
  • 1
    You can get the account for the SharePoint Timer Service as well using PowerShell, namely via WMI (as Get-Service does not provide this info, see: blogs.technet.microsoft.com/heyscriptingguy/2012/02/15/…): (Get-WmiObject Win32_Service | ? { $_.Name -eq 'SPTimerV4' }).StartName – pholpar Aug 2 '18 at 8:03
-1

This is what I used to change the farm account

Get-SPManagedAccount

New-SPManagedAccount

Remove-SPManagedAccount

Set-SPManagedAccount
  • Can you please add more details regarding what parameters to pass – Robert Lindgren Apr 10 '14 at 8:39
-1

To change the farm account you need to use stsadm, still.

stsadm –o updatefarmcredentials –userlogin DOMAIN\username –password password

  • 2
    The question is not about how to change farm account – Amal Hashim Nov 18 '14 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.