remote change a network drive location - powershell

198 views Asked by At

i got tasked with decommissioning an old file server. so now i would like to move user files from it to another server. however i need to change the user's home drive without logging them off (desktops in locked state).

a few assumptions can be made for the of this question. 1)i know the user's computer name 2)the user does not have any files in a locked/open state 3)i have powershell v4 4)i have access over AD 5)i do not have the user's password

an idea i had was to try and make a credential object based on a user's AD entry and then use New-PSDrive to make a persistent remap of the drive. i don't need to see a user's clear-text password if i can make a credential object from an encrypted password.

might i be on the right track or did i derail somewhere?

1

There are 1 answers

1
mjolinor On

It's usually much easier to make the new server answer to multiple netbios names so the old drive mappings still work with the new server.

http://windowsitpro.com/networking/how-can-i-define-multiple-netbios-names-machine