You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Test-ForAdmin.ps1 around line 70, the Try/Catch will not trap an undefine user, it returns an empty string in $upn which is not trigering the catch. So later the $wid=... is trigering an error since $upn is empty string.
As a workaround after the catch {} I tested that (-not $upn.lenght -eq 0) to do the rest of the stuff.
May not be the best solution and I'm sure you'll find better, but meanwhile, I just wanted to tell you about this problem.
The text was updated successfully, but these errors were encountered:
First thanks for your work
In Test-ForAdmin.ps1 around line 70, the Try/Catch will not trap an undefine user, it returns an empty string in $upn which is not trigering the catch. So later the $wid=... is trigering an error since $upn is empty string.
As a workaround after the catch {} I tested that (-not $upn.lenght -eq 0) to do the rest of the stuff.
May not be the best solution and I'm sure you'll find better, but meanwhile, I just wanted to tell you about this problem.
The text was updated successfully, but these errors were encountered: