Automating Managed Password Change Using PowerShell

Wanted to share a script I wrote a couple months ago for another PFE to create random passwords, log them to a text file and change a SharePoint managed account.  #Identify the account to change$Account = "contoso\svcSPExcel"$ManagedAccount = Get-SPManagedAccount $Account #Generate the Random Password$rand = New-Object System.Random#Generate a new 20 character password$pwd = ""1..20 | ForEach {…

0