Please I need help... two identical strings are not returning $True when checking on IF logical statement.
The images illustrates perfectly my frustration. I'm starting with GUIs don't be cruel please.
I've tried checking with label text with variables from textbox.text everything that came to my mind...
blob:https://imgur.com/5fcdabfb-b86e-436d-9c57-ed5f97c48229
Write-Host "$Udrive\$($comboSamaccount.Text)"
Write-Host "$Homedirectory"
$Udriveinfo = "$Udrive\$($comboSamaccount.Text)"
$labeUdriveINFO.Text = $Udriveinfo
$labeUdriveINFO.Text -eq "$Homedirectory"
if ("$Udrive\$($comboSamaccount.Text)" -eq "$Homedirectory")
{
$Ud = "The U drive is - OK"
}
else
{
$Ud = "The U drive must be changed to $Udrive\$($comboSamaccount.Text)"
}
}
Thanks in advance.
Best regards.