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.
5 Answers
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
-
3Another more "powershell'is" way to find CA
Get-SPWebApplication -IncludeCentralAdministration | ? IsAdministrationWebApplication
Apr 10, 2014 at 8:23
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. Aug 19, 2015 at 9:28 -
1You 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– pholparAug 2, 2018 at 8:03
To change the farm account you need to use stsadm, still.
stsadm –o updatefarmcredentials –userlogin DOMAIN\username –password password
-
2
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 Apr 10, 2014 at 8:39