How to Call CMD.EXE from PowerShell with a Space in the Specified Command's Directory Name
问题 I have the following PowerShell script for verifying my SVN repositories: $SVNAdminDir = 'C:\Program Files (x86)\VisualSVN Server\bin'; $RepositoryDir = 'C:\My Repositories\App1'; $_cmd = "`"$SVNAdminDir`\svnadmin`" verify `"$RepositoryDir`""; Write-Host $_cmd; # Copying this into the command prompt runs without an issue... cmd.exe /c $_cmd; # It's when I try to execute the command from PS that I get the error. But when I try to execute it, I'm receiving the following error message: cmd.exe :