How to create a instance of PSCredential that has no password? (Without manually filling out a Get-Credential dialog with no password, this is for unattended ru
Get-Credential
Solution:
$mycreds = New-Object System.Management.Automation.PSCredential ("username", (new-object System.Security.SecureString))