Tag Archives: ADSI

Get domain DN

([adsi]”).distinguishedName

That’s all you need.  Nothing more.

Just remember that all ADSI in Net Framework is defaulted to the current domain.  There is never a need to set it  like in VBScript.  Just use the objects and they will all be defualted to the most commong and most useful values.

[adsi]” – gets the currect domain root.

[adsisearcher]” gets the searcher.

([adsisearcher]’objectCategory=user’).FindAll()

([adsiseracher]’samAccountName=john smith’).FindOne()  #search for one user by samname

Search Filter Syntax Windows

Search Filter Syntax Windows.

smsagent

Scripts, tools and tips, mostly around Microsoft SCCM and EMS

To The Point

Anything about Technology and Business

Brian's Power Windows Blog

Microsoft in the Enterprise. Windows, Hyper-V, Exchange, SQL, and more!

PowerScripting Podcast

Shownotes and links for the PowerScripting Podcast, a podcast to help people learn Windows Powershell

Learn Powershell | Achieve More

What is this Powershell of which you speak?