Marc Davis (Customer) asked a question.

PowerShell script to clear Automation SMB Drive Mappings

This script will clear all drive/share mappings from the current automation server. Use only when no jobs are running!

 

Helps fix: "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed" without needing to reboot the Automation server.

 

Create a new custom PowerShell script:

 

# Clear all SMB mappings (mapped SMB shares / drives)

Get-SmbMapping -ErrorAction SilentlyContinue |

  Remove-SmbMapping -Force -UpdateProfile -Confirm:$false

 

Run on-demand as needed; connections will re-establish; depending on the order you may still run into the error.

 


Nichol Goldstein likes this.