Created
June 28, 2018 11:25
-
-
Save AshFlaw/6cec295adcd500bb2705723622e70e1a to your computer and use it in GitHub Desktop.
A one line command to get a full (username and password) credential object without bringing them in from variables.
This file contains 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
$Credential = New-Object System.Management.Automation.PSCredential 'username',(convertto-securestring 'password' -asplaintext -force) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment