Creating or Re-Creating Managed Accounts (w/ Powershell)



Note: you could also use this script to re-create the managed accounts in a situation where they had been deleted.


This approach is much easier and cleaner than entering, New-SPManagedAccount, then manually having to type in the cryptic password and user account with domain\ prefix.