다음 명령을 실행하려고하면"Powershell 스크립트를 실행하려고하면 단항 연산자 '-'뒤에 표현이 누락됩니다.
C:\Documents and Settings\BURE\My Documents\ibos\script>powershell.exe -NoProfile -WindowStyle Hidden & 'C:\Documents and Settings\BURE\My Documents\ibos\script\files_from_nomad.ps1' 1
오류가 발생합니다.
Missing expression after unary operator '-'.
At line:1 char:2
+ - <<<< WindowStyle Hidden
The filename, directory name, or volume label syntax is incorrect.
이전에는 작동되었지만 지금은 작동하지 않습니까? 왜?
제가하려고하는 것은 schadular 스크립트입니다 :
schtasks /CREATE /RU BURE /SC MINUTE /TN files_to_nomad /TR "powershell.exe -NoProfile -WindowStyle Hidden & 'C:\Documents and Settings\BURE\My Documents\ibos\script\files_to_nomad.ps1' 1"
다른 컴퓨터에서 똑같은 스케줄을 가지고 있습니다.
이 (가)'및'중 하나가 도망 또는 인용해야하지를? 그렇지 않으면'cmd'가 이것을 명령 구분 기호로 취합니다. – Joey
해결되지 않습니다. 그것은 그렇게하기 전에 작동했습니다 – magol