WMI Filters in Group Policy

johnnyg5646johnnyg5646 Member Posts: 173
I'm trying to use a WMI filter in my Group Policy to push a GPO to one specific workstation in an OU without it going to any of the others. If anyone could give me a quick little script for that, or point me in a direction I would be absolutely thrilled.
Thanks everyone!! :D
BS - Computer Science
MS - Computer Information Systems
_________________

Comments

  • undomielundomiel Member Posts: 2,818
    Why not use security filtering? Remove the authorized users group and add the computer account you're wanting for your GPO.

    If you insist upon WMI then the query you want would be:

    Select * FROM Win32_ComputerSystem WHERE Name="Put the name of the system you want in these quotes"

    WMI filtering is slower then using security filtering though.

    Edit:

    P.S.

    WMI Tools
    http://www.microsoft.com/downloads/details.aspx?FamilyID=6430f853-1120-48db-8cc5-f2abdc3ed314&DisplayLang=en

    Great for finding what you need for WMI scripting.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • JDMurrayJDMurray Admin Posts: 13,078 Admin
    undomiel wrote:
    WMI filtering is slower then using security filtering though.
    Really? I would assume that AD uses WMI under the hood for security filtering. Maybe it does in Server 2008 but not in Server 2003. Then again, maybe the WMI subscribers used in security filtering have a higher priority than the WMI filters placed on a GPO. I'd love to know if there really is a difference.
  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Security filtering is all done by the DC based on AD objects (computers, users, groups) while WMI filters require the DC to perform WMI calls against the client computer, hence the delay. You would usually only want to use WMI filters for things like "apply this GPO on all computers running Windows 2000 but not on any running Windows XP".
  • JDMurrayJDMurray Admin Posts: 13,078 Admin
    undomiel wrote:
    I also use a number of free, Microsoft tools for generating WMI scripts and WQL statements, including Scriptomatic2, WMICodeCreator, and WMIDiag.
  • undomielundomiel Member Posts: 2,818
    This is a case of where I'm just relaying information that I've read in a number of places but have never confirmed myself. icon_redface.gif Guilty as charged!

    Now to see if I can find some time to do some performance testing.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • johnnyg5646johnnyg5646 Member Posts: 173
    Thanks guys!

    Here is what I did:

    Root\CimV2;
    Select * from Win32_OperatingSystem WHERE CSName = "computer name"


    works great!! icon_wink.gif
    BS - Computer Science
    MS - Computer Information Systems
    _________________
Sign In or Register to comment.