How to install AD PowerShell module in Windows 7
Firstly check if there is an AD module:
Get-Module ActiveDirectory –listavailable
If you don’t see that line you need to take some actions.
Let's look what to do.
1. Firstly install RSAT for Windows 7 from this link:
2. Then you need to enable Features. I will show you how to it with command line in the right order.
We will use DISM command.
We will use DISM command.
DISM /online /enable-feature /featurename:
DISM /online /enable-feature /featurename: RemoteServerAdministrationTool s-Roles-AD-DS
DISM /online /enable-feature /featurename: RemoteServerAdministrationTool s-Roles-AD-DS-SnapIns
DISM /online /enable-feature /featurename: RemoteServerAdministrationTool s-Roles-AD-Powershell
DISM /online /enable-feature /featurename: RemoteServerAdministrationTool s-Roles-AD-DS- AdministrativeCenter
DISM /online /enable-feature /featurename: RemoteServerAdministrationTool s-Roles-AD-DS-NIS
DISM /online /enable-feature /featurename: RemoteServerAdministrationTool s-Roles-AD-LDS
3. Now you can check if a feature exists with DISM:
dism /online /Get-Features /featurename: RemoteServerAdministrationTool s-Roles-AD-Powershell
Or check it with PowerShell:
Import-Module ActiveDirectory
Now all AD commands in PowerShell should work just fine, f.e.:
Get-ADComputer -Filter *
Комментариев нет:
Отправить комментарий