Returns a list of all the service load order groups found on a computer, and well as their load order.

This script was tested using Object REXX 2.1.0 for Microsoft Windows, available from IBM.

Object REXX
strComputer = "."
objWMIService = .OLEObject~GetObject("winmgmts:\\"||strComputer||"\root\CIMV2")
do objItem over objWMIService~ExecQuery("Select * from Win32_LoadOrderGroup")
    say "Caption:" objItem~Caption
    say "Description:" objItem~Description
    say "Driver Enabled:" objItem~DriverEnabled
    say "Group Order:" objItem~GroupOrder
    say "Install Date:" objItem~InstallDate
    say "Name:" objItem~Name
    say "Status:" objItem~Status