Create an AD Drive for Specified Domain

When you load the Active Directory Module, you get, by default, an Active Directory PSDrive for the current domain.   You can avoid the drive from loading by setting $Env:ADPS_LoadDefaultDrive = 0. When writing scripts to export and import AD delegations, connecting to this remote drive became important to me. Here is an example of the code I used:

About Alan

See http://www.akaplan.com/blog/about/
This entry was posted in Active Directory, Functions, PowerShell, Scripting and tagged , , . Bookmark the permalink.

Leave a Reply