我试图从PowerShell运行一个程序,等待退出,然后访问ExitCode,但我没有太多的运气。我不想在中使用-Wait,因为我需要在后台进行一些处理。Write-Host "Starting Notepad with -Wait - return code will be available"$process = (Start-Proce
如果在Invoke中使用Write-Log函数,则会收到下面的错误消息"Error on remote execution: The term 'Write-Log‘is not recognized“ Add-Content -Path $log_file -Value $log_entry
Function Star