Skip to main content
Pure Technical Services

How-To: Retrieve LUN Serial Numbers using PowerShell

Currently viewing public documentation. Please login to access the full scope of documentation.

KP_Ext_Announcement.png

In this section we will cover:

Retrieve LUN Serial #s

There are automation use cases where having a Pure Storage FlashArray volume serial number for comparisons or correlations in Windows Server. Below is the Windows PowerShell to show the serial numbers for the connected volumes that are specific to 'PURE FlashArray*'. You can also run Get-Disk to show the serial number. 

$AllDevices = gwmi -Class Win32_DiskDrive -Namespace 'root\CIMV2'
ForEach ($Device in $AllDevices) 
{
    if($Device.Model -like 'PURE FlashArray*') {
        @{
        Name=$Device.Name;
        Caption=$Device.Caption;
        Index=$Device.Index;
        SerialNo=$Device.SerialNumber;
        }
    }
}

Example Output

Name     Value                                  
----     -----                                  
Caption  PURE FlashArray  Multi-Path Disk Device
Name     \\.\PHYSICALDRIVE0                     
SerialNo 73E940225A2A52BB0003AE86               
Index    0                                      

Name     Value                                  
----     -----                                  
Caption  PURE FlashArray  Multi-Path Disk Device
Name     \\.\PHYSICALDRIVE3                     
SerialNo 45084F3508BF46140001192C               
Index    3