duminică, 12 iunie 2011

Using ADSI

"When will Microsoft ship an Active Directory provider (or cmdlets)?" is a frequently asked question. There's no direct support for working with Active Directory in either PowerShell vl or v2.
WINDOWS SERVER 2008 R2 PowerShell cmdlets for Active Directory are available in Windows Server 2008 R2, along with a huge raft of other PowerShell functionality. PowerShell v2 is installed and enabled by default.

Automating Active Directory is one of the major areas of scripting, judging by the number of scripts available and die questions being asked on newsgroups. So we have a declared need to automate Active Directory work and a new shell that doesn't directly support working with Active Directory what are we going to do? NOTE The discussion in this section is focused on Active Directory, but the same technologies and interfaces are used to access local user and group accounts, as well as work with Active Directory Lightweight Directory Services (ADLDS, formerly known as ADAM).
The COM-based interface ADSI has been used extensively in VBScript to work with Active Directory. As it's COM-based, we can work with it in PowerShell as we've seen. But there's also a .NET wrapper, System.DirectoryServices, that gives .NET access to ADSI. This situation is further complicated in that PowerShell has introduced a type accelerator for System. DirectoryServices called [ADSI] that provides yet another layer of wrapping.

There are third-party tools available for working with Active  Detailed background information on ADSI can be found in the SDK

Niciun comentariu:

Trimiteți un comentariu