I am this If Else statement that is giving me some trouble.
If (($User.Activate -eq 'Y') -and ($User.employeeType -eq 'Student')) {Set-ADUser $User.sAMAccountName -AccountExpirationDate $Null}
Elseif (($User.Activate -eq 'Y') -and ($User.employeeType -eq 'Employee')) {Set-ADUser $User.sAMAccountName -AccountExpirationDate $Null}
Else {Write-Host "Nothing Happened"}
}
I am trying to match to variables and that is not working. I am just getting the "Nothing Happened". I've searched and from what I can find the variable matching should be correct.
Any ideas?