Datasheet
44 CHAPTER 1
•
USING POWERSHELL WITH ACTIVE DIRECTORY
Use the Active Directory Module
e Active Directory module for PowerShell is a new feature of Windows Server
2008 R2. As discussed earlier, prior to Windows Server 2008 R2, you had to use
the ADSI interfaces for using PowerShell with Active Directory. Windows Server
2008 R2 provides you with several cmdlets for Active Directory administration. e
Active Directory module groups these cmdlets together into a package. In order to
use the Active Directory module, you have to install it on the computer from which
you’re performing the administration and then load the module in PowerShell.
e Active Directory module will only run on Windows Server 2008 R2 and
Windows 7. e following editions of Windows are capable of running the module:
▶
Windows 7 (all versions)
▶
Windows Server 2008 R2 Standard
▶
Windows Server 2008 R2 Enterprise
▶
Windows Server 2008 R2 Datacenter
It’s important to understand that the Active Directory module can only be used
with domain controllers running the Active Directory Web Services (ADWS) com-
ponent or the Active Directory Management Gateway (ADMG). Table 1.8 lists the
domain controller operating system requirements for each.
TABLE 1.8 Requirements for ADWS and ADMG
Component Domain Controller OS
Active Directory Web Services Windows Server 2008 R2
Active Directory Management Gateway Windows Server 2003 SP2
Windows Server 2003 R2
Windows Server 2008 SP2
ese components provide a web services interface to Active Directory. e Active
Directory PowerShell module uses SOAP-based web services protocols to commu-
nicate with the domain controller. If you don’t have ADWS or ADMG installed on
at least one domain controller in your environment, then you won’t be able to use
the Active Directory PowerShell module.
Load the Active Directory Module
A er you’ve installed the Active Directory module, you can use the cmdlets in
PowerShell. To use the cmdlets, you’ll need to import the module. Use the following
PowerShell command to import the Active Directory module:
PS C:\> Import-Module ActiveDirectory
c01.indd 44c01.indd 44 5/12/2011 1:07:56 PM5/12/2011 1:07:56 PM