Windows PowerShell - Save and Reuse Credentials

The following script saves credentials for the servers listed in the CSV file.

Script:

clip_image001

CSV File (The SecureString property is created when the above script is run):

clip_image002

The following script uses the stored credentials to monitor the servers stored in the CSV file:

The script below uses the IP Address, but the Hostname could be used instead if DNS were configured properly.

clip_image003

The output:

clip_image004

Popular posts from this blog

Get local computer UUID/GUID using Windows Powershell

gPLink and gPOptions

PSLoggedOn Getting Started on Windows Server 2008 R2