Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

up vote 9 down vote accepted

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

share|improve this answer
    
seems to work - thanks! –  David Martines Apr 20 '12 at 13:46

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

share|improve this answer
1  
Another more "powershell'is" way to find CA Get-SPWebApplication -IncludeCentralAdministration | ? IsAdministrationWebApplication –  Anders Rask Apr 10 at 8:23

This is what I used to change the farm account

Get-SPManagedAccount

New-SPManagedAccount

Remove-SPManagedAccount

Set-SPManagedAccount
share|improve this answer
    
Can you please add more details regarding what parameters to pass –  Robert Lindgren Apr 10 at 8:39

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

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

share|improve this answer
1  
The question is not about how to change farm account –  Amal Hashim Nov 18 at 15:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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