Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have about 60-70 machines that may or may not have SSRS. The password just expired for the service accounts that it runs under. Is there a way to script the update password for SSRS?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

this powershell code will change service accoutn info for any number of services. In this version the list is retreived from a file but this could be easily modified to pull from AD. Also note that you cna change multiple services at one time. In this case change the filter to simply be " -filter "name=SSRS". i also specify the account name. I'm not positive it's required but i've never done it without the account name as well. For many services a service restart is also required and for that you should uncomment the restart lines.

$account="domain\userName" 
$password="password"
$computers = get-content servers.txt 
$svcs = gwmi win32_service -filter "name='myservice' and name='myservice2' and name='myservice3'" -computerName $computers 
foreach($s in $svcs)
{ 
        $s.change($null,$null,$null,$null,$null,$null,$account,$password,$null,$n­ull,$null) 
      # optional service restart
      # $s.stopservice
      # $s.startservice
} 
share|improve this answer
    
Thank you for the answer, and this does look like how you would update the application account password. My concern is that all the necessary things that are unique to SSRS are not updated. If you search for "Dependencies on the Report Server Windows Service Identity" on msdn.microsoft.com/en-us/library/ms160340(v=SQL.90).aspx there is a list of things that need to done to update correctly. Is there a way to automate these by doing the update through some SSRS Command Line utility? –  Eric Oct 21 '10 at 18:25
    
Is your SQl server reporting service running in integrated mode? What are the other concerns? If you are just changing the password (see msdn.microsoft.com/en-us/library/ms189964(v=SQL.90).aspx) of the reporting service you do not need to back up the symmetric key as the account is not changing. –  Jim B Oct 21 '10 at 21:29
add comment

You can use the SMO WMI Management class which supposedly takes care of any special permissions.

[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement")
$wmi = new-object ("Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer") $env:computername
$wmi.services | where {$_.Type -eq 'ReportServer'} | foreach {$_.SetServiceAccount('contoso\mylogin','mypassword')}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.