This script is a specific example of setting a property on a server within Configuration Manager to a value that is gathered from a script. In this case, we use the output from agentinfo to set a property on each servers that specifies whether the server is currently up and running. This script, when combined with smart server groups, allows users to filter out down servers.
NOTE: The value of the property will only be as recent as the last run of the script. Therefore, it is possible for a server to say that it's on-line even when it is not (and vice versa).
This sample script can also be found in the samples directory within the product distribution.