This might be of use via WMI...Unfortunately I have no way of testing here in the office.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa394074%28v=vs.85%29.aspx