PowerTip: Avoid Loading the AD: Drive with the Active Directory Module

Doctor Scripto

Summary: Learn how to avoid loading the default AD: drive when you load the Active Directory module for Windows PowerShell.

Hey, Scripting Guy! Question How can I avoid creating the default AD: drive when I import the Active Directory module for Windows PowerShell?

Hey, Scripting Guy! Answer Use the ENV drive and set the ADPS_LoadDefaultDrive variable to 0. Add the following line to your Windows PowerShell profile to make the change “permanent.”

$Env:ADPS_LoadDefaultDrive = 0 

0 comments

Discussion is closed.

Feedback usabilla icon