Testing Computers
Testing Computers
Tests the existence of the specified Computer object(s). Returns true, if the Computer 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 Computer "WIN10-02" underneath "Managed Users & Computers\solys.local\Chicago\ITService\Workstations" exists:
Test-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Workstations\WIN10-02" |
The command below tests, if a Computer with a name starting with "WIN10" exists in the OU "Managed Users & Computers\solys.local\Chicago\ITService\Workstations":
Test-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Workstations\WIN10*" |
Finally this snippet tests, if there is at least one Computer object anywhere underneath the "solys.local" Domain:
Test-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\*" -Recurse |