Here's the PSExec command:
Code: Select all
c:\pstools\psexec \\[remote machine] -u [user] -p [password] -h -w "c:\test\exe\dir" -i 1 cmd /c "powershell c:\test\exe\dir\smoketest.ps1" -accepteula
Code: Select all
# Run Smoke Test
$testRoot = "c:\test\exe\dir"
Start-Process -FilePath "$testRoot\SmokeTest\SmokeTest\bin\Debug\SmokeTest.exe" -ArgumentList "/zr /rf:$testRoot/TestResults/SmokeTest." -WorkingDirectory "$testRoot\SmokeTest\SmokeTest\bin\Debug" -Wait -Verb runAs