Skip to content

Instantly share code, notes, and snippets.

@a73xsh
Created August 3, 2017 13:13
Show Gist options
  • Save a73xsh/59463149c50d75c3a25889cf20823f8e to your computer and use it in GitHub Desktop.
Save a73xsh/59463149c50d75c3a25889cf20823f8e to your computer and use it in GitHub Desktop.
User credential in powershell script
$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