PowerShell - open console with credentials stored in variable

Create a script and save it in %userprofile%\WindowsPowerShell\profile.ps1
In script put:
$cred = get-credential -username Lab\admin -Message 'Need admin pass for $cred'

Komentarze