Testing Users
Testing Users
Tests the existence of the specified User object(s). Returns true, if the User exists and false if it doesn't.
Examples:
Hint: The execution of these examples requires a connected PowerShell drive. |
The following example tests, if the User "Adam Sam" underneath "Managed Users & Computers\solys.local\Chicago\ITService\Users" exists:
Test-EmdbUser "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Users\Adam Sam" |
The command below tests, if a User with a name starting with "Albert" exists in the OU "Managed Users & Computers\solys.local\Chicago\Production\Users":
Test-EmdbUser "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\Production\Users\Albert*" |
Finally this snippet tests, if there is at least one User object anywhere underneath the "solys.local" Domain:
Test-EmdbUser "emdb:\rootDSE\Managed Users & Computers\solys.local\*" -Recurse |