Failed to connect to the service manager

The "Failed to connect to the service manager" error is usually related to SMB connection issues. 

Troubleshooting steps

There may be an issue with stale SMB sessions introducing communication issues between the machine running PDQ and your targets that may need to be closed. You can confirm if there are any stale sessions by running the below command on your PDQ server and on any targets that return the "Failed to connect to the service manager" error:

Get-SmbSession -IncludeHidden | where secondsexists -ge 28800

If you restart the PDQ background services, this should close the stale SMB connections. Once done, try deploying again and see if the results are better. Alternatively, you can close them with the following command:

Get-SmbSession -IncludeHidden | Close-SmbSession -Force

Was this article helpful?
Still have a question or want to share what you have learned? Visit our Community Discord to get help and collaborate with others.