VMware Site Recovery Manager 5.8 command on SRM with Powershell bug

Hello, we have another VMware Site Recovery Manager (SRM) bug. This time it’s with Command on SRM server and Powershell scripts.

I am not SRM developer but it seems SRM itself parses commands before passing it to Windows OS for execution. Sometimes it causes issues.
Let’s take a look at this line:c:\windows\system32\windowspowershell\v1.0\powershell.exe -Command "(Invoke-Command -ComputerName REMOTEPC -FilePath "C:\SRM\test1.ps1")"

In the example above we are executing Powershell script on remote host (REMOTEPC). Everything looks standard and it works if you run it directly in the Windows Operating System.

Conclusion
My ticket is still open with VMware and engineering team is currently investigating. You will be affected by this bug if your script’s file path name contains spaces. You need to wrap it with quotes.