Do you want to use “ActiveDirectory” module in PowerShell 7 RC.1 in Windows 10? For those who haven’t notice yet, seem like one of the recent updates to Windows 10 RTM Build 1909 will includes the latest version of this module.
“ActiveDirectory” module version 184.108.40.206 will not work in PowerShell 7 RC.1. It will give the following error during the import module process:
“ActiveDirectory module imports, but the PSDrive AD: is not created.
Set-Location: Cannot find drive. A drive with the name ‘AD’ does not exist.”
To correct the issue, you will need to update this module to version 220.127.116.11.
How to install the updated version?
First, make sure you have installed all of the latest Windows updates. Previous ActiveDirectory module will be on version 18.104.22.168.
To install, look in the “App or remove programs | Optional Features” then look under “Add a feature” for the “RSAT: Active Directory Domain Services and Lightweight Directory Services Tools.”
It will replace the previous version with the newer one and will work with PowerShell 7 RC.1.
To use this module the system need to be a member of a domain, or you’ll get the following error message:
“WARNING: Error initializing default drive: ‘Unable to find a default server with Active Directory Web Services
Also, it’s only available for Windows 10 RTM Build 1909, Windows 10 Insider Edition, and Windows Server 2019.