Windows Server: SAN storage script

Parity123 used Ask the Experts™

I have been asked to report on all the servers that are connected to SAN. We have a few hundred servers. These servers are Windows 2008 R2.

Could you please help me with a script or a way to get this info.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017

What are you being asked to report! There are different ways to pull info using powershell, wmic
As well as other tools.


List all the servers , drive letters, and disk space, that are using SAN for storage. Could you please provide me a sample script or tool I can use. Thanks.
Distinguished Expert 2017
wmi logicaldisk will include the information
DriveType, but I think the SAN resource will be seen/reflected the same way C: is as a localDrive

I think you should be looking/generating this report from the SAN.
There you have the allocated LUNS, and the hosts to which each LUN is allocated.

This will give you a narrowed down list.
you can then use powershell to remotely connect to each server's wmi interface and query the logicaldisk.
The result will then based on partition/lun size would need to be combined with the SAN report to complete ....
The below describes the class.
and includes a VB script example.

The following is a powershell example to query WMI.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial