(imported topic written by rharmer91)
What relevance statement is best used for separating Windows 2000 workstation from server?
Thanks,
Rich
(imported topic written by rharmer91)
What relevance statement is best used for separating Windows 2000 workstation from server?
Thanks,
Rich
(imported comment written by tim_tsai)
There are several ways of distinguishing between server and workstation OSes. Because WMI queries can be resource intensive, the preferred method is to query the registry. In particular, the registry key value “ProductType” under “HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions” can be used.
There is an importable property “OS Type” that does just this, it is available along with many other useful properties at this web page:
http://support.bigfix.com/bes/misc/retrievedproperties.html
Note that if the default property doesn’t quite suit your purposes, there is a “preview relevance” function that you can use to copy out the relevance code and customize as necessary.
(imported comment written by rharmer91)
I was all set to use what you suggested with the following relevance statement
(exists key “HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions” whose (value “ProductType” of it as string = “ServerNT”)of registry)
When I saw on one of my test servers that LanmanNT was the value on that Key. I’ll have to do some research, but I’m not certain why that key is set that way.
Rich
(imported comment written by tim_tsai)
Hey Rich,
A “ProductType” value of “ServerNT” indicates that the machine is a stand-alone server. Whereas “LanmanNT” indicates that the machine is a primary or backup domain controller. This Microsoft KB article can be helpful: http://support.microsoft.com/?kbid=152078
(imported comment written by rharmer91)
This is the information I found…
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions\ProductType
This is a string value that is interpreted as follows:
Value Interpretation
“WinNT” NT Workstation
“ServerNT” NT Server
“LanmanNT” NT Advanced Server
Rich
(imported comment written by BenKus)
Hey Rich,
Our favorite expression for differentiating servers from workstations is:
if (name of operating system as lowercase starts with “win”) then (if (name of operating system = “Win95” OR name of operating system = “Win98” or name of operating system = “WinME”) then “Workstation” else (if (value “ProductType” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions” of registry = “WinNT”) then “Workstation” else “Server”)) else "Unknown - " & name of operating system
This doesn’t differentiate between “Advanced Server” and “Server”, but is nice because it is accurate and it should work for all Windows versions.
Another property that will give you the full OS name for Windows uses WMI:
if (exists wmi) then (string values of selects “caption from win32_operatingsystem” of wmi) else (“N/A”)
This works well too, but as you can see from other posts, wmi sometimes has issues and we try to avoid using it if possible.
Note that both of these properties are at http://support.bigfix.com/bes/misc/retrievedproperties.html and I think they are available already in one of the Analyses on the BES License and Inventory site.
Ben