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

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

  • Comments 2
  • Likes

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 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment