원격 서버에서 PowerShell 스크립트를 실행하도록 MSDeploy를 얻으려고합니다.MSdeploy runcommand에서 PowerShell을 실행하지 못했습니다.
는echo "Hello world!"
powershell.exe C:\temp\WebDeploy\Package\HelloWorld.ps1
echo "Done"
HelloWorld.ps1에만 포함되어 있습니다 :
msdeploy \
-verb:sync \
-source:runCommand='C:\temp\HelloWorld.bat', \
waitInterval=15000,waitAttempts=1 \
-dest:auto,computername=$WebDeployService$Credentials -verbose
HelloWorld.bat은 포함이 내가 MSDeploy를 실행하는 방법이다 PowerShell을 종료 결코처럼
Write-Host "Hello world from PowerShell!"
그러나, 그것은 보인다. 이것은 msdeploy를 실행 한 결과입니다.
Verbose: Performing synchronization pass #1.
Verbose: Source runCommand (C:\temp\HelloWorld.bat) does not match destination (C:\temp\HelloWorld.bat) differing in attributes (isSource['True','False']). Update pending.
Info: Updating runCommand (C:\temp\HelloWorld.bat).
Info:
Info: C:\temp>echo "Hello world!"
"Hello world!"
C:\temp\WebDeploy>powershell.exe C:\temp\HelloWorld.ps1
Info: Hello world from Powershell!
Info:
Warning: The process 'C:\Windows\system32\cmd.exe' (command line '/c "C:\Users\peter\AppData\Local\Temp\gaskgh55.b2q.bat
"') is still running. Waiting for 15000 ms (attempt 1 of 1).
Error: The process 'C:\Windows\system32\cmd.exe' (command line '/c "C:\Users\peter\AppData\Local\Temp\gaskgh55.b2q.bat"'
) was terminated because it exceeded the wait time.
Error count: 1.
누구나 해결책을 알고 있습니까?
그것에 대한 전체 소스 코드가 포함 된 최종 해결책은 무엇입니까? – Kiquenet