I've done this in the past but no longer really have systems in workgroups and different OS to script it for you.

However, please review the documentation here which should help you to undertand better what or how your scripting may be failing and how to correct it.

Connecting to WMI on a Remote Computer
http://msdn.microsoft.com/library/defaul...te_computer.asp

Connecting Between Different Operating Systems
http://msdn.microsoft.com/library/defaul...ing_systems.asp