I\'m having an issue with powershell when invoking an exe at a path containing spaces.
PS C:\\Windows Services> invoke-expression \"C:\\Windows Services\\My
Would this do what you want?:
& "C:\Windows Services\MyService.exe"
Use &, the call operator, to invoke commands whose names or paths are stored in quoted strings and/or are referenced via variables, as in the accepted answer. Invoke-Expression is not only the wrong tool to use in this particular case, it should generally be avoided.