ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    WMI Filtering

    Scheduled Pinned Locked Moved IT Discussion
    4 Posts 2 Posters 850 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      Jason Banned
      last edited by

      I'm trying to apply a group policy to computers that aren't named like using a wmi filter. However it tells me the syntax isn't correct. This guy even used the same one so has it changed or something? http://www.waynezim.com/2009/07/how-to-use-wmi-filtering-to-improve-group-policy-administration/

      1 Reply Last reply Reply Quote 0
      • J
        Jason Banned
        last edited by Jason

        found this: https://social.technet.microsoft.com/Forums/systemcenter/en-US/5d549159-554b-4e64-bba6-aefebe475494/osd-skip-a-task-sequence-step-by-query?forum=configmgrgeneral

        Yeah, the NOT is wrong, WQL doesn't contain a "not like" operator but you can move the not to the beginning of the condition to negate its       value. Thus, this will work
        select * from Win32_computersystem where not (Name like "%W" or Name like "%W0[1-8]")
        
        J 1 Reply Last reply Reply Quote 0
        • DashrenderD
          Dashrender
          last edited by

          can you post your setting?

          1 Reply Last reply Reply Quote 0
          • J
            Jason Banned @Jason
            last edited by

            @Jason said in WMI Filtering:

            found this: https://social.technet.microsoft.com/Forums/systemcenter/en-US/5d549159-554b-4e64-bba6-aefebe475494/osd-skip-a-task-sequence-step-by-query?forum=configmgrgeneral

            Yeah, the NOT is wrong, WQL doesn't contain a "not like" operator but you can move the not to the beginning of the condition to negate its       value. Thus, this will work
            select * from Win32_computersystem where not (Name like "%W" or Name like "%W0[1-8]")
            

            Worked like a charm

            1 Reply Last reply Reply Quote 2
            • 1 / 1
            • First post
              Last post