Identify Windows Server Core Machines

HI
Although technically the BigFix Client is not support or a Windows Server Core install we need to identify the machine that are current running server core.

I need to create an automatic group which I can populate using relevance.

For example I know a machine is running Windows 2019 Server core. However in the OS Properties is reports “Win2019 10.0.17763.379 (1809)” Even the Full Operating System Name and Service Pack Level only reports "Microsoft Windows Server 2019 Standard "

Does anybody know of a way to do this?

Matt

Relevance ((exists keys “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion” whose (exists values whose(name of it = “InstallationType” AND it as string as lowercase = “Server Core” as lowercase ) of it) of native registry)

does the trick.

3 Likes

Switch((Get-ItemProperty “HKLM:/Software/Microsoft/Windows NT/CurrentVersion”).InstallationType){
“Server Core” {$coremachine=$true}
default {$coremachine=$false}}