Wednesday, February 18, 2015

Get SharePoint or IIS Application Pool account usernames and PASSWORDS with powershell.

Sometimes you need to know a service account password and don't have it. Maybe your dog ate the documentation to your dev environment. Powershell to the rescue!

PS U:\> Add-WindowsFeature Web-WMI | Format-List
PS U:\> Get-CimInstance -Namespace root/MicrosoftIISv2 -ClassName IIsApplicationPoolSetting -Property Name, WAMUserName, WAMUserPass | select Name, WAMUserName, WAMUserPass

Fun and scary.