Evotec

Project

GPOZaurr

GPOZaurr helps inspect, report on, and remediate Group Policy environments with PowerShell.

Stars 1,166
Forks 115
Open issues 16
PowerShell Gallery downloads 417,764
Release v1.1.9
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-GPOZaurrWMI

Namespace GPOZaurr

Creates a new WMI filter based on a WMI filter query.

Remarks

This function creates a new WMI filter in Active Directory based on a specified WMI filter query.

Examples

Authored help example

EXAMPLE 1

PS >


New-GPOZaurrWMI -Name "TestWMIFilter1" -Query "SELECT * FROM Win32_OperatingSystem" -Force
Creates a new WMI filter named "TestWMIFilter1" targeting all Windows operating systems.
        

EXAMPLE 2

PS >


New-GPOZaurrWMI -Name "TestWMIFilter2" -Query "SELECT * FROM Win32_Processor" -Forest "Contoso" -IncludeDomains "FinanceDomain"
Creates a new WMI filter named "TestWMIFilter2" targeting all processors in the "FinanceDomain" within the "Contoso" forest.
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-GPOZaurrWMI [-Description <String>] [-ExcludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [-Force] [-Forest <String>] [-IncludeDomains <String[]>] -Name <String> [-Namespace <String>] -Query <String> [-SkipQueryCheck] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Description String optionalposition: 1pipeline: False
The description for the new WMI filter. Default is an empty string.
ExcludeDomains String[] optionalposition: 5pipeline: False
An array of domains to exclude from WMI application.
ExtendedForestInformation IDictionary optionalposition: 7pipeline: False
Additional information about the forest for WMI customization.
Force SwitchParameter optionalposition: namedpipeline: False
Switch to force the creation of the WMI entry without confirmation.
Forest String optionalposition: 4pipeline: Falsealiases: ForestName
The forest to target for WMI creation.
IncludeDomains String[] optionalposition: 6pipeline: Falsealiases: Domain, Domains
An array of domains to include for WMI application.
Name String requiredposition: 0pipeline: False
The name of the new WMI filter to be created.
Namespace String optionalposition: 2pipeline: False
The WMI namespace to target. Default is 'root\CIMv2'.
Query String requiredposition: 3pipeline: False
The WMI filter query to be applied to the WMI entry.
SkipQueryCheck SwitchParameter optionalposition: namedpipeline: False
Switch to skip the query check before creating the WMI entry.