Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
How to change the password on a SharePoint Managed Account after it has already been changed in AD - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2014-10-07

So , one of the developers called me up and told me that he could not get into his single server development SharePoint farm, he could deploy his solution however.   So I rolled my eyes and said what did you do.. Nothing was the reply! (are you surprised)  . Well it turned out that he had been forced to change his password. And you guessed it, he used that account to setup his SharePoint installation.  So much for the principle of least privilege concept!   He then went in and started changing the passwords in the SharePoint Service in the windows Service.msc interface.  Once the server was restarted we got the famous “Service Unavailable” error.  The application pools just would just not stay up ! Even Pfizer could not help!

So I dug up some powershell  TADA and I could not find a reference to it on this site so I though it would be a useful tit bit.

Changing the password on a SharePoint managed Account after it has already been changed in AD

### Start Script ###

# Loading Microsoft.SharePoint.PowerShell
$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.
SharePoint.Powershell'}
if ($snapin -eq $null) {
Write-Host "Loading SharePoint Powershell Snapin"
Add-PSSnapin "Microsoft.SharePoint.Powershell"
}


#Prompt for Managed Account you want to change 
 $ManagedAccount = Read-Host "Enter managed account as Domain\User:"

#For my developer buddies if you are only using one managed account  (BOO), this will work
#$ManagedAccount = Get-SPManagedAccount
 

#Get the password that has already been changed in AD, make sure you login with it to make sure 
  
$NewPassword = Read-Host "Enter password from Managed account:" –AsSecureString
  
#Change the password
  
Set-SPManagedAccount -Identity $ManagedAccount -ExistingPassword $NewPassword –UseExistingPassword $true

### End Script ###

/Colin

 

(Visited 293 times, 1 visits today)

About the author 

Colin St Rose

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.