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 for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    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 51 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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.