The pre/post run in the local shell on the target. anything you can run from the target locally can be called here. so if your vb script is one the target, you can call it from pre/post.
Ok, So I want to reboot servers before patching if they are uptime x number of days. I can achieve this through NSH or VB script, but the limitation I have is that I cannot some file in the server for VB script method and when it comes NSH it becomes complicated if I need to pass the server list from one job to another as the process is kind of semi-automated. Everything is staged before the outage window, need to reboot the server if they are up for x number of days immediately after the outage window mean while other servers will get patched.
i'd ask why? why does it matter how long the servers are up if you reboot them or not ? just patch and reboot them at the end.
The way I like to do patching is the following:
1) I'd like to take a copy of all the Automatic services status prior to patching - just so i know if something doesn't come up that was up before. Typically I've done this via a powershell script
2) I always reboot servers before patching as I find it does it cleaner
3) After patching I take another copy of the services status.
So can I do something similar in the pre post command sections?
For instance in PRE- can i tell the server to take a copy of services status and then reboot eg shutdown /r /f /t 0
Then let the normal patching run proceed when the server is up
then POST can i take another printout?
So I guess is that possible using the Patching mechanism?
Afaik pre/post won’t wait for a reboot to complete.
Any way you know of I can set it to reboot prior to patching?
Batch job. scripts, orchestration.
Okay - thanks for that