Skip to content

Instantly share code, notes, and snippets.

@PrateekKumarSingh
Created October 24, 2018 20:32
Show Gist options
  • Save PrateekKumarSingh/5a788a2115484e05a9dbcd5a8c7c5a0c to your computer and use it in GitHub Desktop.
Save PrateekKumarSingh/5a788a2115484e05a9dbcd5a8c7c5a0c to your computer and use it in GitHub Desktop.
$password = ConvertTo-SecureString 'Password@123' -AsPlainText -Force
New-Object System.Management.Automation.PSCredential ('Administrator', $password)
# Alternatively create credentials using the type accelerator
[PSCredential]::new('Adminstrator', $password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment