Skip to content

Instantly share code, notes, and snippets.

@cheshirewara
Created February 10, 2020 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cheshirewara/1cb5cbaefc5dee575feff8a8c58589ce to your computer and use it in GitHub Desktop.
Save cheshirewara/1cb5cbaefc5dee575feff8a8c58589ce to your computer and use it in GitHub Desktop.
function New-PSCredential( $ID, $PlainPassword ){
$SecurePassword = ConvertTo-SecureString –String $PlainPassword –AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential($ID, $SecurePassword)
Return $Credential
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment