Multiple connections to a server or shared resource by the same user rename computer

Recently while working with PowerShell to copy files from local drive to SharePoint document library I got the below error: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.

The full error message looks like below:

net : System error 1219 has occurred.
At C:\Users\Bijaya.Sahoo\Desktop\LargeFileUpdated.ps1:181 char:1
+ net use $fileDirectory /USER:$username $password
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (System error 1219 has occurred.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.

Multiple connections to a server or shared resource by the same user
Multiple connections to a server or shared resource by the same user

multiple connections to a server or shared resource by the same user rename computer

The fix the error multiple connections to a server or shared resource by the same user rename computer, run the below command:

net use * /delete

Read some SharePoint PowerShell tutorials:

This PowerShell tutorial helps us to fix error multiple connections to a server or shared resource by the same user rename computer.

>