Setting Up PowerShell for Active Directory


When I first started looking at using PowerShell 2 in AD, I just got some code and starting punching it in, which of course didn’t work at all. Frustrated I started digging around and found out that you need to import the system modules first.

Next from the search bar type “Active Directory Module for Windows PowerShell”, right click and select Run As Administrator. This will import all the Active Directory modules for PowerShell and make your life alot easier!


Once this is complete you have access to all the Active Directory modules in PowerShell. You can confirm this by typing Get-ADUser <Username> and hitting enter and you should  get some info about the user.

Now your all ready to rock and roll with PowerShell for Active Directory. My only gripe is that you need to do this every time you want to run PowerShell in AD, but I’m sure there is a reason for having to do that.

I also know that you can set it up in your PowerShell profile to load the AD modules are well, but I’ll cover that at a later time.



About Phill McSherry
Phill McSherry has been working in the Australian IT industry for over 20 years and is the technical manager and solutions architect for managed services provider Titan Solutions -

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: