Author Posts

September 26, 2017 at 3:00 pm

Hi,
I need to get SAN disk details on server and if no external LUN's attached the script should output message 'No external disks found'
I have tried WMI class win32_volume with filter for drivetype eq '3' but it just gets me local disk.

Thanks,
Kishor

September 26, 2017 at 4:33 pm

try Get-SBDisk function of the SB-Tools module (requires PS 5, Install-Module SB-Tools -Force). It outputs DriveLetterorMountPoint property. Are SAN disks mounted to a folder or a drive letter?
How are SAN volumes connected? iSCSI?

September 26, 2017 at 9:08 pm

Win32_Volume will just show you SAN disks already formated, mounted as a volume. You might wanna query Win32_DiskDrive: https://msdn.microsoft.com/en-us/library/aa394132(v=vs.85).aspx

September 27, 2017 at 10:44 am

Thank you Leandro, Win32_Diskdrive and filtered 'model' like 'powerpath', it has solved my problem.

Thanks,
Kishor