Incorrect loop execution on Windows 10
Posted: Thu Jan 09, 2020 1:25 pm
To help you better we need some information from you.
*** Please fill in the fields below if you are currently using a Trial Version of the Product. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: Sapien powershell studio 2012, 3.1.19
32 or 64 bit version of product: 64 bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit
*** Please add details and screenshots as needed below. ***
My program runs perfectly on a Windows 7 workstation, but does not function properly on Windows 10 workstation.
Below is a snippet of the script
if(($textbox2.Text -eq "") -or ($textbox2.Text -eq $null))
{
[void][System.Windows.Forms.MessageBox]::Show("Enter email address to send the info to !","No receiver specified")
$buttonGO.Enabled = $true
}
else
{
$validation = $null
$validation = Get-ADUser -filter * | where {$_.UserPrincipalName -eq $textbox2.Text}
if($validation -eq $null)
{
[void][System.Windows.Forms.MessageBox]::Show("Incorrect recipient email address","Check email address")
$errorFlag = 1
}
}
For some reason it keeps going in the else loop even when i am entering the correct email address in textbox2.
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
*** Please fill in the fields below if you are currently using a Trial Version of the Product. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: Sapien powershell studio 2012, 3.1.19
32 or 64 bit version of product: 64 bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit
*** Please add details and screenshots as needed below. ***
My program runs perfectly on a Windows 7 workstation, but does not function properly on Windows 10 workstation.
Below is a snippet of the script
if(($textbox2.Text -eq "") -or ($textbox2.Text -eq $null))
{
[void][System.Windows.Forms.MessageBox]::Show("Enter email address to send the info to !","No receiver specified")
$buttonGO.Enabled = $true
}
else
{
$validation = $null
$validation = Get-ADUser -filter * | where {$_.UserPrincipalName -eq $textbox2.Text}
if($validation -eq $null)
{
[void][System.Windows.Forms.MessageBox]::Show("Incorrect recipient email address","Check email address")
$errorFlag = 1
}
}
For some reason it keeps going in the else loop even when i am entering the correct email address in textbox2.
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM