     {
              0 { "Unknown" }
              1 { "Thin" }
              2 { "Fixed" }
              Default { "Unknown" }
            }
          }
          else
          {
            $null
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>SupportedProvisioningTypes</Name>
        <GetScriptBlock>
          $_status = @();
          foreach ( $status in $this.psBase.CimInstanceProperties["SupportedProvisioningTypes"].Value )
          {
            switch ( $status )
            {
              0 { $_status += "Unknown" }
              1 { $_status += "Thin" }
              2 { $_status += "Fixed" }
              Default { "Unknown" }
            }
          }
          $_status;
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>MediaTypeDefault</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["MediaTypeDefault"].Flags.HasFlag( [Microsoft.Management.Infrastructure.CimFlags]::NullValue ) -eq $false )
          {
            switch ( $this.psBase.CimInstanceProperties["MediaTypeDefault"].Value )
            {
              0 { "Unspecified" }
              3 { "HDD" }
              4 { "SSD" }
              5 { "SCM" }
              Default { "Unspecified" }
            }
          }
          else
          {
            $null
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>ReadOnlyReason</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["ReadOnlyReason"].Flags.HasFlag([Microsoft.Management.Infrastructure.CimFlags]::NullValue) -eq $false )
          {
            switch ($this.psBase.CimInstanceProperties["ReadOnlyReason"].Value)
            {
              0 { "Unknown" }
              1 { "None" }
              2 { "By Policy" }
              3 { "Majority Disks Unhealthy" }
              4 { "Starting" }
              Default { "Unknown" }
            }
          }
          else
          {
            $null
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>RepairPolicy</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["RepairPolicy"].Flags.HasFlag([Microsoft.Management.Infrastructure.CimFlags]::NullValue) -eq $false )
          {
            switch ( $this.psBase.CimInstanceProperties["RepairPolicy"].Value )
            {
              2 { "Sequential" }
              3 { "Parallel" }
              Default { "Parallel" }
            }
          }
          else
          {
            $null
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>RetireMissingPhysicalDisks</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["RetireMissingPhysicalDisks"].Flags.HasFlag([Microsoft.Management.Infrastructure.CimFlags]::NullValue) -eq $false )
          {
            switch ( $this.psBase.CimInstanceProperties["RetireMissingPhysicalDisks"].Value )
            {
              0 { "Unknown" }
              1 { "Auto" }
              2 { "Always" }
              3 { "Never" }
              Default { "Unknown" }
            }
          }
          else
          {
            $null
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>WriteCacheSizeDefault</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["WriteCacheSizeDefault"].Value -eq [System.UInt64]::MaxValue )
          {
            "Auto"
          }
          else
          {
            $this.psBase.CimInstanceProperties["WriteCacheSizeDefault"].Value
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>Version</Name>
        <GetScriptBlock>
          # ScVersionWindows8
          if ( $this.psBase.CimInstanceProperties["Version"].Value -eq 1 )
          {
          "Windows Server 2012"
          }

          # ScVersionWindowsBlueInternal1
          # ScVersionWindowsBlueInternal2
          # ScVersionWindowsBlueInternal3
          # ScVersionWindowsBlueInternal4
          # ScVersionWindowsBlueInternal5
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -eq 2 )
          {
          "Windows Server 2012 R2 Preview"
          }

          # ScVersionWindowsBlue
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -eq 3 )
          {
          "Windows Server 2012 R2"
          }

          # ScVersionWindowsThresholdInternal1
          # ScVersionWindowsThresholdInternal2
          # ScVersionWindowsThresholdInternal3
          # ScVersionWindowsThresholdInternal4
          # ScVersionWindowsThresholdInternal5
          # ScVersionWindowsThresholdInternal6
          # ScVersionWindowsThreshold
          # ScVersionWindowsThreshold2
          # ScVersionWindowsRedstone1Internal1
          # ScVersionWindowsRedstone1Internal2
          # ScVersionWindowsRedstone1Internal3
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -ge 4 -and $this.psBase.CimInstanceProperties["Version"].Value -le 18 )
          {
          "Windows Server 2016 Preview"
          }

          # ScVersionWindowsRedstone1
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -eq 19 )
          {
          "Windows Server 2016"
          }

          # ScVersionWindowsRedstone3
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -eq 20 )
          {
          "Windows Server 2016 RS3"
          }

          # ScVersionWindowsRedstone5Internal1
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -eq 21 )
          {
          "Windows Server 2019 Preview"
          }

          # ScVersionWindowsRedstone5
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -eq 22 )
          {
          "Windows Server 2019"
          }

          # >= ScVersionWindows19H1Internal1
          elseif ( $this.psBase.CimInstanceProperties["Version"].Value -ge 23 )
          {
          "Windows Server vNext"
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>FaultDomainAwarenessDefault</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["FaultDomainAwarenessDefault"].Value)
          {
            1 { "PhysicalDisk" }
            2 { "StorageEnclosure" }
            3 { "StorageScaleUnit" }
            4 { "StorageChassis" }
            5 { "StorageRack" }
            Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptMethod>
        <Name>GetSecurityDescriptor</Name>
        <Script>
          $ConnectionOptions = New-Object Microsoft.Management.Infrastructure.Options.DComSessionOptions
          $CimSession = [Microsoft.Management.Infrastructure.CimSession]::Create("localhost", $ConnectionOptions)
          $Result = $CimSession.InvokeMethod("root/Microsoft/Windows/Storage", $this, "GetSecurityDescriptor", $null)

          $FileSecurity = New-Object System.Security.AccessControl.FileSecurity
          $FileSecurity.SetSecurityDescriptorSddlForm($Result.OutParameters["SecurityDescriptor"].value)
          $FileSecurity
        </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>SetSecurityDescriptor</Name>
        <Script>
          param([string]$SecurityDescriptor=$("Parameter missing: -SecurityDescriptor SecurityDescriptor"))
          $ConnectionOptions = New-Object Microsoft.Management.Infrastructure.Options.DComSessionOptions
          $CimSession = [Microsoft.Management.Infrastructure.CimSession]::Create("localhost", $ConnectionOptions)
          $Parameters = New-Object -TypeName Microsoft.Management.Infrastructure.CimMethodParametersCollection
          $SecurityDescriptorParam = [Microsoft.Management.Infrastructure.CimMethodParameter]::Create("SecurityDescriptor",$SecurityDescriptor,"string",0)
          $Parameters.Add($SecurityDescriptorParam)
          $Result = $CimSession.InvokeMethod("root/Microsoft/Windows/Storage",$this,"SetSecurityDescriptor",$Parameters)
        </Script>
      </ScriptMethod>
    </Members>
  </Type>
  <!--

  //
  // ResiliencySetting
  //

  -->
  <Type>
    <Name>Microsoft.Management.Infrastructure.CimInstance#MSFT_ResiliencySetting</Name>
    <Members>
      <ScriptProperty>
        <Name>ParityLayout</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["ParityLayout"].Flags.HasFlag([Microsoft.Management.Infrastructure.CimFlags]::NullValue) -eq $false )
          {
            switch ($this.psBase.CimInstanceProperties["ParityLayout"].Value)
            {
              1 { "Non-rotated Parity" }
              2 { "Rotated Parity" }
              Default { "Unknown" }
            }
          }
          else
          {
            $null
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>NumberOfColumnsDefault</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["NumberOfColumnsDefault"].Value -eq [System.UInt16]::MaxValue )
          {
            "Auto"
          }
          else
          {
            $this.psBase.CimInstanceProperties["NumberOfColumnsDefault"].Value
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>NumberOfGroupsDefault</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["NumberOfGroupsDefault"].Value -eq [System.UInt16]::MaxValue )
          {
            "Auto"
          }
          else
          {
            $this.psBase.CimInstanceProperties["NumberOfGroupsDefault"].Value
          }
        </GetScriptBlock>
      </ScriptProperty>
    </Members>
  </Type>
  <!--

  //
  // StorageProvider
  //

  -->
  <Type>
    <Name>Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageProvider</Name>
    <Members>
      <ScriptProperty>
        <Name>Type</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["Type"].Value)
          {
            1 { "SMP" }
            2 { "SMI-S" }
            Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>RemoteSubsystemCacheMode</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["RemoteSubsystemCacheMode"].Value)
          {
            0 { "Unknown" }
            2 { "Disabled" }
            3 { "Manual-Discovery" }
            Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>SupportedRemoteSubsystemCacheModes</Name>
        <GetScriptBlock>
          $_status = @();
          foreach ( $status in $this.psBase.CimInstanceProperties["SupportedRemoteSubsystemCacheModes"].Value )
          {
            switch ( $status )
            {
              0 { $_status += "Unknown" }
              2 { $_status += "Disabled" }
              3 { $_status += "Manual-Discovery" }
              Default { "Unknown" }
            }
          }
          $_status;
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptMethod>
        <Name>GetSecurityDescriptor</Name>
        <Script>
          $ConnectionOptions = New-Object Microsoft.Management.Infrastructure.Options.DComSessionOptions
          $CimSession = [Microsoft.Management.Infrastructure.CimSession]::Create("localhost", $ConnectionOptions)
          $Result = $CimSession.InvokeMethod("root/Microsoft/Windows/Storage", $this, "GetSecurityDescriptor", $null)

          $FileSecurity = New-Object System.Security.AccessControl.FileSecurity
          $FileSecurity.SetSecurityDescriptorSddlForm($Result.OutParameters["SecurityDescriptor"].value)
          $FileSecurity
        </Script>
      </ScriptMethod>
      <ScriptMethod>
        <Name>SetSecurityDescriptor</Name>
        <Script>
          param([string]$SecurityDescriptor=$("Parameter missing: -SecurityDescriptor SecurityDescriptor"))
          $ConnectionOptions = New-Object Microsoft.Management.Infrastructure.Options.DComSessionOptions
          $CimSession = [Microsoft.Management.Infrastructure.CimSession]::Create("localhost", $ConnectionOptions)
          $Parameters = New-Object -TypeName Microsoft.Management.Infrastructure.CimMethodParametersCollection
          $SecurityDescriptorParam = [Microsoft.Management.Infrastructure.CimMethodParameter]::Create("SecurityDescriptor",$SecurityDescriptor,"string",0)
          $Parameters.Add($SecurityDescriptorParam)
          $Result = $CimSession.InvokeMethod("root/Microsoft/Windows/Storage",$this,"SetSecurityDescriptor",$Parameters)
        </Script>
      </ScriptMethod>
    </Members>
  </Type>
  <!--

  //
  // StorageSubSystem
  //

  -->
  <Type>
    <Name>Microsoft.Management.Infrastructure.CimInstance#MSFT_StorageSubSystem</Name>
    <Members>
      <ScriptProperty>
        <Name>NameFormat</Name>
        <GetScriptBlock>
          if ( $this.psBase.CimInstanceProperties["NameFormat"].Flags.HasFlag([Microsoft.Management.Infrastructure.CimFlags]::NullValue) -eq $false )
          {
            switch ($this.psBase.CimInstanceProperties["NameFormat"].Value)
            {
              1 { "Other" }
              2 { "IP" }
              3 { "Dial" }
              4 { "HID" }
              5 { "NWA" }
              6 { "HWA" }
              7 { "X25" }
              8 { "ISDN" }
              9 { "IPX" }
              10 { "DCC" }
              11 { "ICD" }
              12 { "E.164" }
              13 { "SNA" }
              14 { "OID/OSI" }
              15 { "WWN" }
              16 { "NAA" }
              Default { "Unknown" }
            }
          }
          else
          {
            $null
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>HealthStatus</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["HealthStatus"].Value)
          {
            0 { "Healthy" }
            1 { "Warning" }
            2 { "Unhealthy" }
            Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>OperationalStatus</Name>
        <GetScriptBlock>
          $_status = @();
          foreach ( $status in $this.psBase.CimInstanceProperties["OperationalStatus"].Value )
          {
            switch ( $status )
            {
              1 { $_status += "Other" }
              2 { $_status += "OK" }
              3 { $_status += "Degraded" }
              4 { $_status += "Stressed" }
              5 { $_status += "Predictive Failure" }
              6 { $_status += "Error" }
              7 { $_status += "Non-Recoverable Error" }
              8 { $_status += "Starting" }
              9 { $_status += "Stopping" }
              10 { $_status += "Stopped" }
              11 { $_status += "In Service" }
              12 { $_status += "No Contact" }
              13 { $_status += "Lost Communication" }
              14 { $_status += "Aborted" }
              15 { $_status += "Dormant" }
              16 { $_status += "Supporting Entity in Error" }
              17 { $_status += "Completed" }
              18 { $_status += "Power Mode" }
              19 { $_status += "Relocating" }
              Default { $_status += "Unknown" }
            }
          }
          $_status;
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>FaultDomainAwarenessDefault</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["FaultDomainAwarenessDefault"].Value)
          {
            1 { "PhysicalDisk" }
            2 { "StorageEnclosure" }
            3 { "StorageScaleUnit" }
            4 { "StorageChassis" }
            5 { "StorageRack" }
            Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
        <ScriptProperty>
          <Name>MaskingValidInitiatorIdTypes</Name>
          <GetScriptBlock>
              $_type = @();
              foreach ( $type in $this.psBase.CimInstanceProperties["MaskingValidInitiatorIdTypes"].Value )
              {
              switch ( $type )
              {
              1 { $_type += "Other" }
              2 { $_type += "Port WWN" }
              3 { $_type += "Node WWN" }
              4 { $_type += "Host Name" }
              5 { $_type += "iSCSI Name" }
              6 { $_type += "Switch WWN" }
              7 { $_type += "SAS Address" }
              Default { $_type += "Unknown" }
              }
              }
              $_type;
          </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
          <Name>MaskingPortsPerView</Name>
          <GetScriptBlock>
              switch ($this.psBase.CimInstanceProperties["MaskingPortsPerView"].Value)
              {
              2 { "One TargetPort per view" }
              3 { "Multiple target ports per view" }
              4 { "All target ports share the same view" }
              Default { "Unknown" }
              }
          </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
          <Name>DataTieringType</Name>
          <GetScriptBlock>
            if ( $this.psBase.CimInstanceProperties["DataTieringType"].Flags.HasFlag([Microsoft.Management.Infrastructure.CimFlags]::NullValue) -eq $false )
            {
              switch ($this.psBase.CimInstanceProperties["DataTieringType"].Value)
              {
                0 { "Unknown" }
                1 { "Not Supported" }
                2 { "Manual" }
                3 { "Auto" }
                Default { "Unknown" }
              }
            }
            else
            {
              $null
            }
          </GetScriptBlock>
          </ScriptProperty>
          <ScriptProperty>
            <Name>iSCSITargetCreationScheme</Name>
            <GetScriptBlock>
              if ( $this.psBase.CimInstanceProperties["iSCSITargetCreationScheme"].Flags.HasFlag([Microsoft.Management.Infrastructure.CimFlags]::NullValue) -eq $false )
              {
                switch ($this.psBase.CimInstanceProperties["iSCSITargetCreationScheme"].Value)
                {
                  0 { "Unknown" }
                  1 { "Not Supported" }
                  2 { "Manual" }
                  3 { "Auto" }
                  Default { "Unknown" }
                }
              }
              else
              {
                $null
              }
            </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
          <Name>SupportedHostType</Name>
          <GetScriptBlock>
              $_type = @();
              foreach ( $type in $this.psBase.CimInstanceProperties["SupportedHostType"].Value )
              {
              switch ( $type )
              {
              0 { $_type += "Unknown" }
              1 { $_type += "Other" }
              2 { $_type += "Standard" }
              3 { $_type += "Solaris" }
              4 { $_type += "HPUX" }
              5 { $_type += "OpenVMS" }
              6 { $_type += "Tru64" }
              7 { $_type += "Netware" }
              8 { $_type += "Sequent" }
              9 { $_type += "AIX" }
              10 { $_type += "DGUX" }
              11 { $_type += "Dynix" }
              12 { $_type += "Irix" }
              13 { $_type += "Cisco iSCSI Storage Router" }
              14 { $_type += "Linux" }
              15 { $_type += "Microsoft Windows" }
              16 { $_type += "OS400" }
              17 { $_type += "TRESPASS" }
              18 { $_type += "HI-UX" }
              19 { $_type += "VMware ESXi" }
              20 { $_type += "Microsoft Windows Server 2008" }
              21 { $_type += "Microsoft Windows Server 2003" }
              Default { $_type += "Unknown" }
              }
              }
              $_type;
          </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
          <Name>SupportedDeduplicationObjectTypes</Name>
          <GetScriptBlock>
              $_type = @();
              foreach ( $type in $this.psBase.CimInstanceProperties["SupportedDeduplicationObjectTypes"].Value )
              {
              switch ( $type )
              {
              2 { $_type += "Volume" }
              4 { $_type += "VirtualDisk" }
              8 { $_type += "Partition" }
              16 { $_type += "StoragePool" }
              Default { $_type += "Unknown" }
              }
              }
              $_type;
          </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
          <Name>SupportedDeduplicationFileSystemTypes</Name>
          <GetScriptBlock>
              $_type = @();
              foreach ( $type in $this.psBase.CimInstanceProperties["SupportedDeduplicationFileSystemTypes"].Value )
              {
              switch ( $type )
              {
              0 { $_type += "Unknown" }
              1 { $_type += "Threshold" }
              2 { $_type += "UFS" }
              3 { $_type += "HFS" }
              4 { $_type += "FAT" }
              5 { $_type += "FAT16" }
              6 { $_type += "FAT32" }
              7 { $_type += "NTFS4" }
              8 { $_type += "NTFS5" }
              9 { $_type += "XFS" }
              10 { $_type += "AFS" }
              11 { $_type += "EXT2" }
              12 { $_type += "EXT3" }
              13 { $_type += "ReiserFS" }
              14 { $_type += "NTFS" }
              15 { $_type += "ReFS" }
              32768 { $_type += "CSVFS_NTFS" }
              32769 { $_type += "CSVFS_ReFS" }
              Default { $_type += "Unknown" }
              }
              }
              $_type;
          </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>SupportedFileSystems</Name>
        <GetScriptBlock>
          $_type = @();
          foreach ( $type in $this.psBase.CimInstanceProperties["SupportedFileSystems"].Value )
          {
          switch ( $type )
          {
          0 { $_type += "Unknown" }
          2 { $_type += "UFS" }
          3 { $_type += "HFS" }
          4 { $_type += "FAT" }
          5 { $_type += "FAT16" }
          6 { $_type += "FAT32" }
          7 { $_type += "NTFS4" }
          8 { $_type += "NTFS5" }
          9 { $_type += "XFS" }
          10 { $_type += "AFS" }
          11 { $_type += "EXT2" }
          12 { $_type += "EXT3" }
          13 { $_type += "ReiserFS" }
          14 { $_type += "NTFS" }
          15 { $_type += "ReFS" }
          32768 { $_type += "CSVFS_NTFS" }
          32769 { $_type += "CSVFS_ReFS" }
          Default { $_type += "Unknown" }
          }
          }
          $_type;
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>StorageConnectionType</Name>
        <GetScriptBlock>
          switch ( $this.psBase.CimInstanceProperties["StorageConnectionType"].Value )
          {
          0 { "Unknown" }
          1 { "Shared Storage" }
          2 { "Local Storage" }
          Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>SupportedFileServerProtocols</Name>
        <GetScriptBlock>
          $_protos = @();
          foreach ( $p in $this.psBase.CimInstanceProperties["SupportedFileServerProtocols"].Value )
          {
          switch ( $p )
          {
          2 { $_protos += "NFS" }
          3 { $_protos += "SMB" }
          Default { "Unknown" }
          }
          }
          $_protos;
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptMethod>
        <Name>GetSecurityDescriptor</Name>
        <Script>
          $ConnectionOptions = New-Object Microsoft.Management.Infrastructure.Options.DComSessionOptions
          $CimSession = [Microsoft.Management.Infrastructure.CimSession]::Create("localhost", $ConnectionOptions)
          $Result = $CimSession.InvokeMethod("root/Microsoft/Windows/Storage", $this, "GetSecurityDescriptor", $null)

          $FileSecurity = New-Object System.Security.AccessControl.FileSecurity
          $FileSecurity.SetSecurityDescriptorSddlForm($Result.OutParameters["SecurityDescriptor"].value)
          $FileSecurity
        </Script>
      </ScriptMethod>
      <ScriptMethod>
                <Name>SetSecurityDescriptor</Name>
                <Script>
                    param([string]$SecurityDescriptor=$("Parameter missing: -SecurityDescriptor SecurityDescriptor"))
                    $ConnectionOptions = New-Object Microsoft.Management.Infrastructure.Options.DComSessionOptions
                    $CimSession = [Microsoft.Management.Infrastructure.CimSession]::Create("localhost", $ConnectionOptions)
                    $Parameters = New-Object -TypeName Microsoft.Management.Infrastructure.CimMethodParametersCollection
                    $SecurityDescriptorParam = [Microsoft.Management.Infrastructure.CimMethodParameter]::Create("SecurityDescriptor",$SecurityDescriptor,"string",0)
                    $Parameters.Add($SecurityDescriptorParam)
                    $Result = $CimSession.InvokeMethod("root/Microsoft/Windows/Storage",$this,"SetSecurityDescriptor",$Parameters)
                </Script>
      </ScriptMethod>
    </Members>
  </Type>
  <!--

  //
  // Volume
  //

  -->
  <Type>
    <Name>Microsoft.Management.Infrastructure.CimInstance#MSFT_Volume</Name>
    <Members>
      <ScriptProperty>
        <Name>OperationalStatus</Name>
        <GetScriptBlock>
          $_status = @();
          foreach( $status in $this.psBase.CimInstanceProperties["OperationalStatus"].Value )
          {
            switch ( $status )
            {
              1 { $_status += "Other" }
              2 { $_status += "OK" }
              3 { $_status += "Degraded" }
              4 { $_status += "Stressed" }
              5 { $_status += "Predictive Failure" }
              6 { $_status += "Error" }
              7 { $_status += "Non-Recoverable Error" }
              8 { $_status += "Starting" }
              9 { $_status += "Stopping" }
              10 { $_status += "Stopped" }
              11 { $_status += "InService" }
              12 { $_status += "No Contact" }
              13 { $_status += "Lost Communication" }
              14 { $_status += "Aborted" }
              15 { $_status += "Dormant" }
              16 { $_status += "Supporting Entity in Error" }
              17 { $_status += "Completed" }
              18 { $_status += "Power Mode" }
              19 { $_status += "Relocating" }
              53261 { $_status += "Scan Needed" }
              53262 { $_status += "Spot Fix Needed" }
              53263 { $_status += "Full Repair Needed" }
              53267 { $_status += "Offline" }
              Default { $_status += "Unknown" }
            }
          }
          $_status;
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>HealthStatus</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["HealthStatus"].Value)
          {
          0 { "Healthy" }
          1 { "Warning" }
          2 { "Unhealthy" }
          Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>DriveType</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["DriveType"].Value)
          {
          0 { "Unknown" }
          1 { "Invalid Root Path" }
          2 { "Removable" }
          3 { "Fixed" }
          4 { "Remote" }
          5 { "CD-ROM" }
          6 { "RAM Disk" }
          Default { "Unknown" }
          }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>FileSystemType</Name>
        <GetScriptBlock>
            switch ($this.psBase.CimInstanceProperties["FileSystemType"].Value)
            {
              0 { "Unknown" }
              2 { "UFS" }
              3 { "HFS" }
              4 { "FAT" }
              5 { "FAT16" }
              6 { "FAT32" }
              7 { "NTFS4" }
              8 { "NTFS5" }
              9 { "XFS" }
              10 { "AFS" }
              11 { "EXT2" }
              12 { "EXT3" }
              13 { "ReiserFS" }
              14 { "NTFS" }
              15 { "ReFS" }
              32768 { "CSVFS_NTFS" }
              32769 { "CSVFS_ReFS" }
              Default { $null }
            }
        </GetScriptBlock>
      </ScriptProperty>
      <ScriptProperty>
        <Name>DedupMode</Name>
        <GetScriptBlock>
          switch ($this.psBase.CimInstanceProperties["DedupMode"].Value)
          {
          0 { "Disabled" }
          1 { "GeneralPurpose" }
          2 { "HyperV" }
          3 { "Backup" }
          4 { "NotAvailable" }
          Default { "Unknown" }
          }
