top of page
Search

Export a list of mapped drives

  • ToddimusPrime
  • May 10, 2021
  • 1 min read

Have you ever been working with a user to get them moved over to a new computer, then two weeks later they contact you saying that they're missing a mapped drive or two? Too bad you already reimaged their old computer and nobody has any clue what those drive mappings were... If only you'd run this script earlier!


Run it while logged in as the user, and it'll dump a .reg file on their desktop. Copy that file over to their new computer, give it a double click, and kablammo, the drives are now mapped on the new computer.


$path = $env:USERPROFILE + "\desktop\" + $env:USERNAME + " - Mapped Drives.reg"
reg export HKCU\Network $path

Comments


©2021 by ToddimusPrime

bottom of page