I'm trying to use the Get-ADRootDSE command in Powershell on a Domain Controller running Windows Server 2008 R2 but I get the following error message:
The term 'Get-ADRootDSE' is not recognised as the name of a cmdlet (...)
I wonder if this command can run locally, and what are the pre-requisites to use it within Powershell.
Using Control Panel
On the Domain Controller, logged as an Administrator go to:
Control Panel\System And Security\Administrative Tools
Right click on the shortcut "Active Directory Module for PowerShell" Choose "Run as Administrator"
A PowerShell prompt will pop-up with the relevant Module loaded.
In the PowerShell prompt run:
Get-ADRootDSE
Using PowerShell command
On the Domain Controller, logged as an Administrator, within Powershell
Import-Module Active Directory
Get-ADRootDSE