Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

searching AD

$
0
0

I have this code that works.

$search= [System.DirectoryServices.DirectorySearcher]$root
$search.Filter="(cn=$computer)"
$result=$search.FindOne()
$computerToMove= [ADSI]$result.path

It is part of a script that moves your computer to a specific OU within AD.   I have Googled around on how to query the AD "JetDatabase" There is a lot out there but what I have not found yet is where do you get a list of commands to use within PowerShell.   Example:   In PS we can type get-help get-process -examples

In PS how do you find out all AD commands like System.DirectoryServices.DirectorySearcher or [System.DirectoryServices.ActiveDirectory.Domain]::

is there a command that will show you this with examples?  


Viewing all articles
Browse latest Browse all 6937

Trending Articles