0

Power shell 脚本返回特定的退出状态,Control-M 无法读取但以不同的状态退出。请让我们知道如何以与 power shell 脚本返回的相同退出状态退出 Control-M 作业。

4

2 回答 2

2

Exit <custom error codes>将从脚本返回自定义返回码

于 2016-03-28T13:16:49.750 回答
0

除此之外,通常最好通过 .bat 文件调用您的 Power Shell 脚本。例如

  1. 有一个 Control-M 作业,它是一个“命令”,并且在命令字段中有这个 -

C:\Program Files\BMC Software\Control-M Agent\Default\Scripts\PS_log_check.bat

  1. 然后 .bat 文件应指向您的 Power Shell 脚本 -

powershell -command "&'C:\Program Files\BMC Software\Control-M Agent\Default\Scripts\PS_log_check.ps1'"

于 2016-03-29T14:18:35.727 回答