Template:PowerShell Credentials Files

From vwiki
Jump to navigation Jump to search

This above script uses two files ($UserFile and $PassFile) to provide authentication credentials to the script without needing the password to exist in unencrypted plain text. To create your own see the script at the bottom of the Store Password Securely section.

Alternatively, remove/comment out the lines that reference the $UserFile and $PassFile variables and use the following line to create the $cred variable instead...

$cred = Get-Credential