http://www.sqlservercentral.com/blogs/sql_server_dba/2012/02/20/sql-server-powershell-active-directory-search/

Printed 2014/11/24 09:20AM

SQL Server – Powershell Active Directory search

2012/02/20

 Working with Powershell and Active Directory simplifies some complex tasks for the DBA.

Active Directory is LDAP compliant. This means the RFC 1779 and RFC 2247 standards are met.

This example lists all employees on an LDAP path. This method requires knowledge of the LDAP path .

 Common Name (cn)

Organizational Unit (ou)

Domain Component (dc)

 

$group = [ADSI] "LDAP://cn=MYORGAllEmployees,ou=MYORG,dc=south,dc=syborg,dc=net" 
foreach ($member in $group.member) 
{ 
$member 
} 

 

See Also

Powershell sql server security audit


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.