Well that is all greek to me an I understand powershell a bit so this is what I came up with.
Now I am a lazy guy and doing WMI queries does my head in. Luckly the guys at GoverLan have this free tool that allows you to browse the WMI tree and generate Powershell code to query it. So the bit below is a mashup of their code and mine