When I log into windows, my system maps a few drives from our server's shares. I have a backup script that I want to run and it maps a few more drives just for the script and then unmaps them when done.
I'm running the following to map:
net use z: "\server\share1" /user:myuser password
It then says System error 1219 has occurred. Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. etc
Thing is, I'm using the same user for everything. Why would it give me this error and how do I fix this? I'm using Windows Server 2008 R2 with this script.
Best Answer
Since at least Windows NT 4.0, only a single set of user credentials can be used for a single server name, where the server name is determined when mapping the resource (e.g. the
server
in\server\share
).If using the same set of user credentials is acceptable, the additional server share can be successfully mapped by not specifying the user name or password. So, in your case, performing the first
net use
with the/user
andpassword
arguments and the second without should work.If using the same set of credentials is not acceptable (i.e. you must map two resources from the same server using different user credentials), you can work around the problem by creating and using a DNS alias for the server, or using the server's IP address.
See the following for additional details: