Power shell script return specific exit status, which Control-M is unable to read but exiting with different status. Please let us know how to exit Control-M job with same exit status as returned by power shell script.
Asked
Active
Viewed 2,081 times
2 Answers
0
In addition to that it is often best to call your Power Shell script via a .bat file. E.g.
- Have a Control-M job that is a "command" and has this in the command field -
C:\Program Files\BMC Software\Control-M Agent\Default\Scripts\PS_log_check.bat
- The .bat file should then point to your Power Shell script -
powershell -command "& 'C:\Program Files\BMC Software\Control-M Agent\Default\Scripts\PS_log_check.ps1'"

Mark
- 316
- 1
- 5