我是powershell的新手,但我面临一个非常基本的问题。当我运行以下命令时,powershell 会抱怨。特殊字符似乎有问题:[*, =, &, <, >]
. 任何想法我如何逃避它们?这是 powershell 版本 2。 [我正在使用 winexe 从 linux 机器上运行 powershell 命令。如果我复制粘贴 ps 命令,它似乎工作正常,但远程运行它会导致 powershell 抱怨。]
winexe "cmd /c echo . | powershell Set-ExecutionPolicy bypass -Force -Scope CurrentUser;C:\test.ps1 -name 'B*=&<+>%N' -extra_logging '0' "
dos charset 'CP850' 不可用 - 使用 ASCII 字符串开始: At line:1 char:106 + Set-ExecutionPolicy bypass -Force -Scope CurrentUser;C:\test.ps1 -lun <<<< 'B*= is missing the终结者:'。在 line:1 char:110 + Set-ExecutionPolicy bypass -Force -Scope CurrentUser;C:\test.ps1 -lun 'B*= <<<< + CategoryInfo : ParserError: (B*=:String) [], ParentContainsErro rRecordException + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
该系统找不到指定的文件。该系统找不到指定的文件。