I need to create a script or batch file to run on multiple computers that unmaps a network share \\serverName\shareName
and maps a new network share \\newServer\newShareName
I can unmap the network drives by using:
net use /delete X:
and map the new share with:
net use * \\newServer\newShareName
but the problem is the drive letter is going to be different on every computer.
How would I check what letter \\serverName\shareName
is mapped to?