We have immense power over our servers with Powershell.

There is so much we can do, or in the case of SBS 2008 (Powershell 2), a lot we wish we could do. I am trying to get a lot of info our of an AD in preparation of moving to a new domain controller. None of my AD scripts work. e.g.

  • Get-ADComputer
  • Get-ADUser

I am constantly getting “The term ‘blah’ is not recognized as the name of a cmdlet”.

Grrr.

After lot’s of reading and playing about, I got what I needed. I was able to install Active Directory Web Service on the machine and then use RSAT on a secondary computer.

So what do you do ?

Let’s start with Server 2008 R2 

You need to have installed

  • Active Directory Domain Services
  • Active Directory Module For Windows PowerShell
  • Active Directory Web Services

Run this at the Powershell commandline

>Import-Module ServerManager
>Add-WindowsFeature RSAT-AD-PowerShell
>import-module activedirectory

You should now be ready to go

Server 2008 or 2003

You need to install this hotfix. The links for this are hard to get working as Microsoft released this patch to only those that actually need it. It has not had very wide testing and has not been checked for what else it could break.
https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=2852

Install the Active Directory Management Gateway Service (Active Directory Web Service for Windows Server 2003 and Windows Server 2008)

Install RSAT on another PC (Windows 7, Windows 10 will be fine)

In powershell

>import-module activedirectory

You should now be ready to go

SBS 2008

Trying to install Active Directory Web Service for Windows Server hotfix as per the above outline, fails. You can try the 32 bit or 64 bit version and it will tell you it is not compatible.

You need to have the file NDP35SP1-KB969166-x86.exe, install it and reboot.

(KB 969166)

It will not install. What can you do? If you really need to get this hotfix installed (Warning, it is not fully tested) then here is a work around.

md c:\temp\AD_Management_Web
expand -F:* “Windows6.0-KB968934-x64.msu” c:\temp\AD_Management_Web
cd c:\windows\system32
start pkgmgr.exe /ip /m:c:\temp\AD_Management_Web\Windows6.0-KB968934-x64.cab

Reboot

Install RSAT on another PC (Windows 7, Windows 10 will be fine)

In powershell

>import-module activedirectory

You should now be ready to go

Useful links

http://thehotfixshare.net/board/index.php?autocom=downloads&showfile=20160

https://powershell.org/forums/topic/ad-module-on-sbs-2008/