Share via

Query Collection Windows Server Core

Vid3al 186 Reputation points
Oct 5, 2022, 9:16 AM

There are many articles online, but I haven't found one functional.

I have to track down all the Server Cores whatever the version. (Win2008/2012/2016/2019/2022)

Does anyone know a functional query?

Thank you all for your support.

Microsoft Configuration Manager
0 comments No comments
{count} votes

8 answers

Sort by: Most helpful
  1. Garth 5,801 Reputation points
    Oct 5, 2022, 10:07 AM

    what do you have now? what isn't working for you?

    0 comments No comments

  2. Vid3al 186 Reputation points
    Oct 5, 2022, 11:35 AM

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.OperatingSystemSKU = 10 or SMS_G_System_OPERATING_SYSTEM.OperatingSystemSKU = 8

    but it does not collect the windows server cores.

    0 comments No comments

  3. Garth Jones 1,666 Reputation points MVP
    Oct 5, 2022, 12:30 PM

    Did you look at the SKU for your core computers? Do they show 8 or 10 for that value?

    0 comments No comments

  4. Garth Jones 1,666 Reputation points MVP
    Oct 5, 2022, 12:31 PM
    0 comments No comments

  5. Vid3al 186 Reputation points
    Oct 5, 2022, 12:58 PM

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.powershell.commands.operatingsystemsku?view=powershellsdk-1.1.0

    247793-image.png

    But my server windows core, in inventory shows the number 7

    247794-image.png

    a windows server 2019 not "core", still shows the number 7.

    I don't understand

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.