Automate WMI Filter to add laptops to an AD Security group.

Matt Burgos 1 Reputation point
2021-05-04T21:59:45.707+00:00

Hello,

I have created a GPO to disable RDP on laptop clients only. I want to define a WMI filter and apply to the GPO which would only allow it to add laptops. The GPO would link to specific OU's which contain computer objects. However, the WMI filter in GPMG is not working correctly. I can run the WMI query locally on a machine, remotely and it works.

What is the proper method to have the WMI filter apply the GPO to laptops only?

any help is appreciated.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,778 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,914 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Fan Fan 15,296 Reputation points Microsoft Vendor
    2021-05-04T23:52:33.097+00:00

    Hi,
    Welcome to ask here!
    For Laptop GPO WMI Filters to find a laptop: If the battery status is not equal to zero ( BatteryStatus <> 0 ) then you know that it is a laptop
    SELECT * FROM Win32_Battery WHERE (BatteryStatus <> 0)
    https://discoposse.com/2012/04/05/group-policy-wmi-filter-laptop-or-desktop-hardware/
    This response contains a third-party link. We provide this link for easy reference. Microsoft cannot guarantee the validity of any information and content in this link.

    Best Regards,

    1 person found this answer helpful.

  2. Ryan B Cooley 21 Reputation points
    2024-01-10T17:58:21.0833333+00:00

    This also works: Select * from Win32_ComputerSystem WHERE (PCSystemType = 2 or PCSystemType = 3) or Select * from Win32_ComputerSystem WHERE (PCSystemType = 1) or (PCSystemType = 3)

    0 comments No comments