This PowerShell script is specific to a piece of software called Idera Up.Time Infrastructure Monitor. We have recently started using this great monitoring application, but I found some parts of rolling it out across our infrastructure a little bit tedious or prone to human error. One such part being setting the up.time agent’s password.

I had a list of 50 servers to deploy the agent on. It was only at sever 36 that I realised I had forgotten to set the password. Knowing that I had around another 400 servers to deploy the agent to, I didn’t fancy logging back onto each server and sorting the password out manually with potential for me to forget again in the future.

To work around this, I have created this PowerShell script to automate setting the password. The way it works is a password is passed to the script, along with a list of servers in a text file. For each of the servers in the text file, it checks if the “Remote Registry” service is started. If it isn’t, it’ll start it and make a note that it had to do this. It’ll then attempt to write the password to the machine, first assuming it is a 64-bit Windows box. If it doesn’t find it, it’ll attempt 32-bit Windows instead. If it had to start the “Remote Registry” service to do its job, it’ll stop it again. If it was already running, then it’ll leave it alone.

Usage: .\UptimePasswordSet.ps1 -Password password -Agents list.txt

download-icon.273921f460a0c6119fe317a1393d1ce1 Download Idera up.time Agent Password Setter v1.1


Source Code