Reputation: 3765
I having server folder as a mapped network drive in workstation . Now the that folder is shifting to to another server so Ineed to change the path this activity I need to do at 400 workstations. so can you help me with script.
Upvotes: 0
Views: 6334
Reputation: 1892
Given drive Letter g:
net use g: /delete
net use g: "\\server\share"
It's important to use the quotes around the path, otherwise paths with spaces will not map correctly.
Upvotes: 0
Reputation: 54600
If your old drive mapping is in O: you use this to delete it:
net use /d O:
And this to create the new one:
net use O: \\newserver\\newpath /PERSISTENT:YES
If you have to specify a username \ password:
net use O: \\newserver\\newpath password /USER:domain\user /PERSISTENT:YES
Upvotes: 2