4 Replies Latest reply on Mar 12, 2018 4:39 PM by mattboren

    Get-EsxCli V2 storage.core.device.list how to access device properties

    thanos24 Novice

      I am using the new Get-EsxCli -V2 option i am able to get an naa/lun device info but can't seem to figure out how to access the properties of it ??

       

      for example:

       

      $esxcli=Get-EsxCli -VMHost esxihost1.local -V2

      $Parameters = $esxcli.storage.core.device.list.CreateArgs()

      $Parameters.device = "naa.6006016037113b006bee66324508e711"

      $naa=$esxcli.storage.core.device.list.Invoke($Parameters)

       

      $naa reports the following info

       

      AttachedFilters                       : {VAAI_FILTER}

      DIXEnabled                            : false

      DIXGuardType                          : NO GUARD SUPPORT

      DevfsPath                             : /vmfs/devices/disks/naa.6006016037113b006bee66324508e711

      Device                                : naa.6006016037113b006bee66324508e711

      DeviceMaxQueueDepth                   : 32

      DeviceType                            : Direct-Access

      DisplayName                           : DGC Fibre Channel Disk (naa.6006016037113b006bee66324508e711)

      DriveType                             : unknown

      EmulatedDIXDIFEnabled                 : false

      HasSettableDisplayName                : true

      IsBootDevice                          : false

      IsBootUSBDevice                       : false

      IsLocal                               : false

      IsLocalSASDevice                      : false

      IsOffline                             : false

      IsPerenniallyReserved                 : false

      IsPseudo                              : false

      IsRDMCapable                          : true

      IsRemovable                           : false

      IsSAS                                 : false

      IsSSD                                 : false

      IsSharedClusterwide                   : true

      IsUSB                                 : false

      IsVVOLPE                              : false

      Model                                 : VRAID

      MultipathPlugin                       : PowerPath

      NoofoutstandingIOswithcompetingworlds : 45

      NumberofPhysicalDrives                : unknown

      OtherUIDs                             : {vml.02000200006006016037113b006bee66324508e711565241494420}

      PIActivated                           : false

      PIProtectionMask                      : NO PROTECTION

      PIType                                : 0

      ProtectionEnabled                     : false

      QueueFullSampleSize                   : 0

      QueueFullThreshold                    : 0

      RAIDLevel                             : unknown

      Revision                              : 0533

      SCSILevel                             : 4

      Size                                  : 512000

      Status                                : on

      SupportedGuardTypes                   : {NO GUARD SUPPORT}

      ThinProvisioningStatus                : yes

      VAAIStatus                            : supported

      Vendor                                : DGC

       

       

      But the type is

      PowerCLI C:\Users\admin\Desktop\scripts> $naa.GetType()

       

      IsPublic IsSerial Name                                     BaseType

      -------- -------- ----                                     --------

      True     True     Object[]                                 System.Array

       

       

      I have tried access elements of $naa such as $naa[5] to get the DeviceMaxQueueDepth, but it's not a normal array .  i don't use powershell on a daily basis just looking for guidance on how to access all the properties above for my NAA object? much thanks