Find objects at a base level in AD only

When searching AD, here's how find objects at a certain level only.

John Savill

May 19, 2017

1 Min Read
Find objects at a base level in AD only

Q. When using the various Get-AD cmdlets, is there a way to only find objects at the base search level?

A. There are a number of cmdlets that can be used to find objects in Active Directory such as Get-AD which will find objects matching the filter at the passed path and in any child container. If you wish to limit the scope of the search you can add the -SearchScope parameter with Base (only find in the path), OneLevel (search one level down) or Subtree (search the entire child hierarchy).

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like