Multi-OEM/Retail Project {MRP} - Mk3

Discussion in 'MDL Projects and Applications' started by mxman2k, Oct 15, 2016.

  1. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,844
    7,870
    210
    #12021 Carlos Detweiller, Mar 3, 2025 at 18:05
    Last edited: Mar 3, 2025 at 18:15
    No prob. With this ESU shenanigans, soon Windows 10 will also be affected. It's easy to filter out with the right WMIC command, but I don't know anything about PowerShell.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    That LicenseAddon bit could come in useful if w10 get a esu :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    OMFG Powers**te is yes at times great --at some things-- but its such a pain in the rear when it throws up the stupidest of errors that you need a encylopedia to understand it all :D :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    Code:
    ESU Program    ESU SKU (or Activation) ID
    Windows 7 SP1 (Client)    
    Year 1    77db037b-95c3-48d7-a3ab-a9c6d41093e0
    Year 2    0e00c25d-8795-4fb7-9572-3803d91b6880
    Year 3    4220f546-f522-46df-8202-4d07afd26454
    
    Windows Server 2008/R2 (Server)    
    Year 1    553673ed-6ddf-419c-a153-b760283472fd
    Year 2    04fa0286-fa74-401e-bbe9-fbfbb158010d
    Year 3    16c08c85-0c8b-4009-9b2b-f1f7319e45f9
    I found these on the net - so the esu (win7) have new SKU ID's....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    in powershell prompt:

    Code:
    
    Get-CimInstance -ClassName SoftwareLicensingProduct | ? { $_.PartialProductKey -ne $null }
    
     
    Gives a lot of info, parsing is the issue i have with PShell, but if that does give the esu info in that (i not got any esu enabled pc's) then i may be able to find a way to parse it like WMIC would .....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    Code:
    
    $SLP = Get-CimInstance SoftwareLicensingProduct -Filter 'Description LIKE "Windows%" AND LicenseStatus = 1'
    $SLP.Description -replace '.*(VOLUME_KMS|VOLUME_MAK|OEM_SLP|RETAIL|OEM_COA_NSLP|OEM_COA_SLP).*', '$1'
    
    
    Seems to be the PS equivelent to WIMIC :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,844
    7,870
    210
    Way to high for me, I guess.

    It could even mention the Addon licenses in the reports (no need for it in the GUI, though).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    pshell does go overboard on its results but most are a pain to parse, you have to fart about with select's and filter's from what i can gather, pretty much you have to hand hold it like a infant , tell it how to do x y z , unlike wmic give it a few bits of info and it parses easy enough.

    One reason why i try to avoid pshell, its good but the syntax takes some getting used to :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,844
    7,870
    210
    As usual, MS' help texts on the command line are not very useful unless you have a profound understanding of the tools already.

    Powershell, I won't open that can of worms, for sure.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,467
    21,500
    210
    I only dabble with pshell when i have no alternative as its such a long winded experience....

    Plus not all ps commands work on older pshell versions which is another royal pain too!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,327
    91,581
    340
    #12032 abbodi1406, Mar 3, 2025 at 23:11
    Last edited: Mar 3, 2025 at 23:17
    LicenseIsAddon does not work well for Win7 :)
    better use "LicenseDependsOn IS NULL" and "LicenseDependsOn IS NOT NULL" to exclude addons or only include addons

    +
    Get-CimInstance is ps 3.0+
    Get-WmiObject should be used :D