Created
August 3, 2017 13:13
-
-
Save a73xsh/59463149c50d75c3a25889cf20823f8e to your computer and use it in GitHub Desktop.
User credential in powershell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$password = "password" | ConvertTo-SecureString -AsPlainText -Force | |
$username = "user" | |
$cred = New-Object System.Management.Automation.PSCredential($username,$password) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment