In this article we will seeing how to get all the managed accounts using 
powershell in SharePoint 2010.
Managed Accounts:
Managed Accounts is a new feature in SharePoint 2010. Managed accounts are 
Active Directory user accounts whose credentials are managed by and contained 
within SharePoint. When administrators configure a new web application or 
service application they don't have to remember the username and passwords every 
time if the service account is registered. They can just simply select the 
managed account and they can configure the web application and service 
application. For example when administrator create a new web application (Go 
to Central Administration => Application management => Manage Web Applications 
=> Click New in the ribbon interface)
Administrator can just choose the service account (whose account is already is 
registered) for the application pool from the drop down as shown in the 
following 
![RegisShare1.gif]()
Automatic password change:
SharePoint 2010 also introduces automatic password change.
Automatic password change enables SharePoint to automatically generate new 
strong passwords on a schedule you set. Select the Enable automatic password 
change checkbox to allow SharePoint to manage the password for the selected 
account. 
If an account policy based expiry date is detected for the account, and the 
expiry will occur before the scheduled date and time, the password will be 
changed on a configured number of days before the expiry date at the regularly 
scheduled time. 
We can choose to enable e-mail notifications in order to have the system 
generate warning notifications about upcoming password change events. 
We can also specify a time and schedule for the system to automatically change 
the password.
Get all Managed Accounts:
Go to Central Administration => Security => General Security => Configure 
managed accounts.
![RegisShare1.gif]()
You could be able to see all the managed accounts.
The same thing can be achieved using the following powershell cmdlet.
Get-SPManagedAccount:
Get-SPManagedAccount – Retrieves accounts registered in the configuration 
database.
Go to Start => All Programs => Microsoft SharePoint 2010 Products =>SharePoint 
2010 Management Shell => Run as administrator.
Type the following command
Get-SPManagedAccount 
This command displays all the managed accounts in the farm.
Note: For more information on Get-SPManagedAccount cmdlet refer
http://technet.microsoft.com/en-us/library/ff607835.aspx