Mapped Drives using PowerShell Scripts

The following snippet shows how to make a powershell script. Note the use of quotation marks as these are important for the script to work. Add these scripts to Logon Scripts settings in GPO.

Where:

  • driveletter = Drive letter you want to use for the drive
  • \\network\share = path to the share
  • username@domain = username on the domain of the share
  • password = password of the user
  • label = label of the share when mapped e.g. US H Drive


The following additional configuration is needed for administrator accounts(search for configure launchapp.wsf):  https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc766208(v=ws.10) 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.