• Win32_SystemSlot not returning documented values.

    Home » Forums » Developers, developers, developers » DevOps Lounge » Win32_SystemSlot not returning documented values.

    Author
    Topic
    #330539

    Hey Y’all,

    This one’s driving me a bit crazy. According to the MS documentation on the class Win32_SystemSlot the value of  the property MaxDataWidth should be from 0-4.
    MaxDataWidth Property uint16 MaxDataWidth {get;}
    0 = 8 Bits
    1 = 16 Bits
    2 = 32 Bits
    3 = 64 Bits
    4 = 128 Bits

    However I’m getting values 5-10? Ideas?

    Here’s the PowerShell script snippet I’m working on.

    $CurrUsage = @{
      0 = "Reserved"
      1 = "Other"
      2 = "Unknown"
      3 = "Available"
      4 = "In Use"
    }
    
    <#Note: Win32_SystemSlot returining values higher than 4!
    Link to System Documentation:
    https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-systemslot
    
    PS> $x.maxdatawidth
    10
    5
    5
    7
    5
    7
    #>
    $DataWidth = @{
      0 = 8
      1 = 16
      2 = 32
      3 = 64
      4 = 128
    }
    
    $x = Get-CimInstance -ClassName Win32_SystemSlot -Namespace root/CIMV2
    $fmtSlots = 
        @{Expression={$_.SlotDesignation};Label="Slot`nDesignation";Width=11},
        @{Expression={$CurrUsage[[Int]$_.CurrentUsage]};Label="Current`nUsage";Width=9},
        @{Expression={$_.Shared};Label="`nShared";Width=6;Align="Right"},
        @{Expression={$_.Status};Label="Status";Width=6},
        @{Expression={$DataWidth[[Int]$_.MaxDataWidth]};Label="Max Data`nWidth";Width=8;Align="Left"}
    $x | Format-Table -Property $fmtSlots
    
    <#   ------ Sample Output -----
    Slot        Current          Status Max Data
    Designation Usage     Shared        Width   
    ----------- --------- ------ ------ --------
    SLOT1       In Use      True OK             
    SLOT2       In Use      True OK             
    SLOT3       In Use      True OK             
    SLOT4       In Use      True OK             
    M.2 WIFI    In Use      True OK             
    M.2 SSD     In Use      True OK             
    #>
    

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!
    Computer Specs

    Viewing 2 reply threads
    Author
    Replies
    • #330553

      I’m am totally out of my league and guess you are trying write a system parts identification script? Just to confirm you are not the only one getting the unexpected output, I tried this with Windows 10 1607 version of PowerShell and get these values with this output.

      datawidth values

      $x.maxdatawidth
      7
      5
      5
      5
      5
      2

      Could it be the SMBIOS data is wrong? Do you get the same result with other computers?

    • #330578

      On my Dell XPS 8700 Win10 1809: 10 5 5 5

      Original post on Dell XPS 8920 Win10 1809.

      On my Dell Inspiron 1564 Laptop Win10 latest Insider Ed:
      Seems PSISE is broken! Won’t run the program or even return $PSVersionTable.
      PSBroken
      Go figure!

      However, PSCMD seems to work as it should.
      PSCmd
      Which is a bit surprising since this machine is running 64 bit Windows & PS!

      But, it still doesn’t report the max data width on the 8920 or the 8700 using PSCMD.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #330614

        Strange, definitely better to query more knowledgeable sources for whatever the source of error might be… I have yet to this with another computer myself, or even looked for a utility to examine the SMBIOS to assist in compare the results.

    • #330737

      FYI, The problem with PSISE on the latest 2 Insider loads has been reported on the feedback hub and upvoted by me.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #330772

        Maybe they will listen, also your script excerpt is just fine. Is is how I thought, after dumping my computer’s SMBIOS not every bit of information for the PCI Express slots data width is displayed, so Windows is probably not buggy and is correctly ignoring the erroneous values.

        The SMBIOS standard is now at 3.2.0, so there are new types of data or a computer’s SMBIOS is wrong.

    Viewing 2 reply threads
    Reply To: Win32_SystemSlot not returning documented values.

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: