Create a custom status message and use its data as arguments to a server side command.
Updated: Mar 9, 2020
Status filter rules has been around for ages so that's not what this post is about. This post is about using the same functionality but whenever you want to by sending a MessageID of your choice, customizing the information sent and using that information as arguments to a command.
Most rules I’ve seen have been triggered by a fail or success event during a sequence and has been used to send or create some kind of report of the outcome.
The commandline for the script could look like this:
“TSOutcome.vbs /ComputerName:%msgsys /ProgramSuccess:Yes”
Useful? Sure, but very limited and %msgsys is a predefined variable.
But what if you want to do something else in the middle of an OSD, like setting variables to the Computer-Resource running the TS?
Well, you can.
There are a number of tools out there that can help you.
StatGen by 2Pint Software (although it’s not working too well in WinPE with multiple MP’s) and the tool we use, OneVinn’s SCCM Console Extension which is great, just to mention two.
So went back and took a look at some stuff I played around with some time ago and here’s the result.
With this rule:
Will look like this in the log:
But the strings will still be passed to the command and this is the result:
And please think about security, escape characters etc, and try to use named arguments if you decide to use this method.
If you can trigger a script from a computer in WinPE and even before starting the TS, anyone can!
“-MP” needs to be set if running outside a TS or if the computer hasn’t got the Advanced client installed (Not tested)
If you just want to write something custom in the log then just leave the messageID alone and pass some insertionsstrings as arguments, the default prop-textfile will do the rest :)