You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is the NetworkCredential puts the domain in a different Field. You need to get the username from the PSCredential and the password from the NetworkCredential
Sorry... never used git so I didn't contribute. LOL. great code otherwise
The text was updated successfully, but these errors were encountered:
I got an exception when creating a credential using a domanname\user
This is what worked for me
function setCredential {
param(
[parameter(mandatory=$true,position=0)]
[string] $keyName,
[parameter(mandatory=$true,position=1,parametersetname="UsernamePassword")]
[string] $username,
[parameter(mandatory=$true,position=2,parametersetname="UsernamePassword")]
[string] $password,
[parameter(mandatory=$true,position=1,parametersetname="PSCredential")]
[System.Management.Automation.PSCredential] $credential,
$cert,
$store = (gi .)
)
if( $cert -eq $null ) {
$cert = selectCertificate
}
}
The problem is the NetworkCredential puts the domain in a different Field. You need to get the username from the PSCredential and the password from the NetworkCredential
Sorry... never used git so I didn't contribute. LOL. great code otherwise
The text was updated successfully, but these errors were encountered: