Command
New-GPOZaurrWMI
Creates a new WMI filter based on a WMI filter query.
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 SetsDescription
This function creates a new WMI filter in Active Directory based on a specified WMI filter query.
Examples
EXAMPLE 1
New-GPOZaurrWMI -Name "TestWMIFilter1" -Query "SELECT * FROM Win32_OperatingSystem" -Force
Creates a new WMI filter named "TestWMIFilter1" targeting all Windows operating systems.EXAMPLE 2
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.Parameters
- -Description String
- The description for the new WMI filter. Default is an empty string.
- -ExcludeDomains String[]
- An array of domains to exclude from WMI application.
- -ExtendedForestInformation IDictionary
- Additional information about the forest for WMI customization.
- -Force SwitchParameter
- Switch to force the creation of the WMI entry without confirmation.
- -Forest String
- The forest to target for WMI creation.
- -IncludeDomains String[]
- An array of domains to include for WMI application.
- -Name String
- The name of the new WMI filter to be created.
- -Namespace String
- The WMI namespace to target. Default is 'root\CIMv2'.
- -Query String
- The WMI filter query to be applied to the WMI entry.
- -SkipQueryCheck SwitchParameter
- Switch to skip the query check before creating the WMI entry.
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.