Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Get-BasicCredentials(){
- Do { $username = Read-host "Enter your username"}
- while ($username -eq "")
- Do { $response = Read-host "Enter your password" -AsSecureString}
- while ($response -eq "")
- $Ptr = [System.Runtime.InteropServices.Marshal]::SecureStringToCoTaskMemUnicode($response)
- $password = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($Ptr)
- return @{username=$username;password=$Password;}
- }
Add Comment
Please, Sign In to add comment