PowerShell: Install ActiveDirectory Easily

#Install-ActiveDirectoryModule.ps1
if(!(get-module -Name ActiveDirectory)){
Get-WindowsFeature -Name RSAT-AD-PowerShell|Install-Windowsfeature -Verbose
Import-Module ActiveDirectory -ea Inquire -NoClobber
}
else{Write-host "ActiveDirectory Module is already installed"}

I have found this make installing the ActiveDirectory Module FAR easier.
Quick.
Painless.


Posted

in

,

by