1

I need to get software RAID configuration info from a remote windows server (2003, 2008, 2012) on a local linux system. I have searched and searched, but have been unsuccessful at finding a solution, as has, it seems, anyone else trying to do a similar thing. (I would have included other similar links, but serverfault forbids me.)

WMI is the preferred method of retrieving this info because it requires no additional, non-default software to be installed on the remote windows server, but any other windows non-install solutions are also acceptable.

I have also looked through and searched the WMI reference without success on this topic. (http:// msdn.microsoft.com/en-us/library/aa394572%28v=vs.85%29.aspx)

Edit:

I'm thinking that winexe(1) is the answer. I have seen and considered the link to the vb script(2) in the accepted answer of the duplicate question. I consider that question to be similar enough to mine to be a real duplicate.

(1): http:// winexe.sourceforge.net/
(2): http:// www.anchor.com.au/hosting/dedicated/monitoring_windows_software_raid

4
  • 1
    Its dumb, but Microsoft doesn't expose this information through WMI. The diskpart tool is just about the only programmatic way to find this information. Commented Jan 8, 2014 at 22:16
  • Dell OpenManage and other similar packages will provide this information, but, sadly, what Evan Anderson said. Commented Jan 8, 2014 at 22:28
  • @KatherineVillyard - Can you confirm that DOMSA will show software RAID info? I've used DOMSA for years but never on a server with software RAID so I don't have any firsthand knowledge of this but am curious.
    – joeqwerty
    Commented Jan 9, 2014 at 17:18
  • Yep, I'm in it right now. There's even a Nagios plugin that takes advantage of this. exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/… Commented Jan 9, 2014 at 17:24

1 Answer 1

1

As Evan mentioned, the info you want isn't exposed via WMI and the highest level way you're going to be able to access it is via the diskpart utility.

However, if you've got a bit of AppDev knowledge and the will to slog through some poor API documentation, you can also query the info directly using the same API that diskpart uses which is the VDS (Virtual Disk Service) API.

Normally, it's accessed via COM. But there is a relatively unknown managed .NET wrapper called System.Microsoft.Vds.dll that only lives on the Server OSes. That DLL plus PowerShell would hypothetically enable you to directly query the information you're looking for. But it's probably going to be a rough ride and might end up being easier just parsing diskpart output.

Here's a blog article I found that talks about using that DLL from C#. But the basic concepts could be translated to PowerShell without too much difficulty.
http://1-800-magic.blogspot.com/2010/10/windows-disk-management-with-net.html

Not the answer you're looking for? Browse other questions tagged .