The first step is to get your PowerShell configured for AD. On a Windows Server 2008 R2 domain controller, this is easy. Just click Start / Windows PowerShell Modules. That will bring up a PowerShell console with all the new goodies loaded up. Now, what about the ISE?
To load the AD Modules up in the ISE, I have a small script that I use. I just run it and I'm ready to go. You can also include this as a function in your own scripts to avoid having to run a supporting script.
Script Name: ImportAD.ps1
Author: Jason A. Yoder, MCT
Company: MCTExpert, Inc.
install the Active Directory components of PowerShell.
- PowerShell V2
- Remote Server Administration Tools
- A Windows domain
# Main Code ===================================
# End Script ===================================