私はコマンドラインからpowershellスクリプトを実行するためにさまざまな方法を試しましたが、すべてがエラーを返します。ここでコマンドラインからパスに空白を入れたpowershellスクリプトを実行するには?
がこのパスです:
C:\Users\test\Documents\test\line space\PS Script\test.ps1
私はこれらを試してみた:
powershell -File '"C:\Users\test\Documents\test\line space\PS Script\test.ps1"'
powershell "& ""C:\Users\test\Documents\test\line space\PS Script\test.ps1"""
Powershell "& 'C:\Users\test\Documents\test\line space\PS Script\test.ps1'"
Powershell -File 'C:\Users\test\Documents\test\line space\PS Script\test.ps1'"
私はすべてのこれらのエラーを取得:
& : The term 'C:\Users\test\Documents\test\line space\PS Script\' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Processing -File ''C:\Users\test\Documents\test\line space\PS Script\'' failed: The given path's format is not support ed. Specify a valid path for the -File parameter.
を任意の助けいただければ幸いです!
よう
-EncodedCommand
パラメータを使用できますか? – TheIncorrigible1