That is a good article and can return some good info if you can get the scripting right. If you are looking to do this against quite a few systems and want to report on it you might find it difficult.
As a consideration, our State Management module collects information like this and stores it historically. Won't do anything with what happened before we were involved, but might be worth considering moving forwards.
MarXtar Ltd/MarXtar Corporation
LANDESK One Development Partner
The One-Stop Shop for LANDESK Enhancements