Last active
March 16, 2021 17:21
-
-
Save AdamZWinter/03c5b4931cac20f3dc94604fcce51f90 to your computer and use it in GitHub Desktop.
Revisions
-
AdamZWinter created this gist
Mar 16, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ #Prompts for the username/password, enter the username in the form of DomainName\UserName $Credential = get-credential -Message "Please enter the VPM credentials" #Converts the password to clear text to pass it through correctly as passing through a secure string does not work. $Password = $credential.GetNetworkCredential().password #Converts the $Credential to just the DomainName/UsernName. $Account = $credential.UserName echo $Password echo $Password.GetType()