none
WMI Filter to target only 2008 and above Windows Servers

    Question

  • I am trying to write a WMI filter to target only 2008 and above Windows Servers.

    Would this work?

    SELECT Version FROM Win32_OperatingSystem WHERE Version > "6" 

    Tuesday, January 19, 2016 3:48 PM

Answers

All replies

  • Hi,

    I think you could add the ProductType parameter.
    For server operating systems that are not domain controllers, use ProductType="3". For domain controllers only, use ProductType="2". This is a useful distinction, because you often want to prevent your GPOs from being applied to the domain controllers on your network.
    Please confirm if the servers are domain controllers or not.

    Here is my example, please take a look:
    select * from Win32_OperatingSystem where Version like "6.%" and ProductType="3"
    It selects Windows server2008 above and not the DCs.

    You could refer to more details in the link as below:
    https://technet.microsoft.com/en-us/library/cc947846(v=ws.10).aspx


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, January 20, 2016 1:49 AM
    Moderator
  • Good Idea, however I am only targeting my 3000 or so member servers we manage in my groups OU. The DCs are in the default OU and have very specific policies for them applied already.

    Will my original statement target what I am looking for it to target? I am going to test tomorrow.

    Wednesday, January 20, 2016 3:40 AM
  • I am trying to write a WMI filter to target only 2008 and above Windows Servers.

    Would this work?

    SELECT Version FROM Win32_OperatingSystem WHERE Version > "6" 

    Win32_OperatingSystem.Version is a string, not an integer. So, if this property contains a value such as '10.0.10586', your WMI query will unexpectedly return 10 < 6

    For this reason, it's recommended that you use LIKE "6%" and not > "6"

    Also, note that your query will return TRUE for Workstation OS editions such as WinVista=6.0, Win7=6.1, Win8=6.2, Win8.1=6.3

    You may consider Wendy's suggestion to use an additional statement such as ProductType if you need to exclude Workstation OS editions


    Don [doesn't work for MSFT, and they're probably glad about that ;]

    Wednesday, January 20, 2016 5:43 AM
  • > I am trying to write a WMI filter to target only 2008 and above Windows
    > Servers.
     
     
    Wednesday, January 20, 2016 2:06 PM
  • Hi,
    I am checking if you issue is solved or not. Are the replies helpful to you?
    If you have any questions, please let us know.
    Appreciate your update.
    Best regards,

    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, January 25, 2016 7:12 AM
    Moderator
  • Hi,
    Thanks for posting in Microsoft TechNet forums.
    As no further update regarding this issue for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios. If the issue still persists, please feel free to reply this post directly so we will be notified to follow it up. You could also choose to unmark the answer as you wish.

    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, February 02, 2016 3:28 AM
    Moderator