Files
GPOZaurr/Docs/New-GPOZaurrWMI.md
Przemysław Kłys ecef7a7f16 update docs
2026-05-22 15:50:38 +02:00

4.5 KiB

external help file, Module Name, online version, schema
external help file Module Name online version schema
GPOZaurr-help.xml GPOZaurr https://github.com/EvotecIT/GPOZaurr 2.0.0

New-GPOZaurrWMI

SYNOPSIS

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

SYNTAX

__AllParameterSets

New-GPOZaurrWMI [-Name] <string> [[-Description] <string>] [[-Namespace] <string>] [-Query] <string> [[-Forest] <string>] [[-ExcludeDomains] <string[]>] [[-IncludeDomains] <string[]>] [[-ExtendedForestInformation] <IDictionary>] [-SkipQueryCheck] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

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

EXAMPLES

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.

PARAMETERS

-Description

The description for the new WMI filter. Default is an empty string.

Type: String
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ExcludeDomains

An array of domains to exclude from WMI application.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ExtendedForestInformation

Additional information about the forest for WMI customization.

Type: IDictionary
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Force

Switch to force the creation of the WMI entry without confirmation.

Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: named
Default value: False
Accept pipeline input: False
Accept wildcard characters: True

-Forest

The forest to target for WMI creation.

Type: String
Parameter Sets: __AllParameterSets
Aliases: ForestName
Possible values:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-IncludeDomains

An array of domains to include for WMI application.

Type: String[]
Parameter Sets: __AllParameterSets
Aliases: Domain, Domains
Possible values:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Name

The name of the new WMI filter to be created.

Type: String
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Namespace

The WMI namespace to target. Default is 'root\CIMv2'.

Type: String
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: 2
Default value: root\CIMv2
Accept pipeline input: False
Accept wildcard characters: True

-Query

The WMI filter query to be applied to the WMI entry.

Type: String
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-SkipQueryCheck

Switch to skip the query check before creating the WMI entry.

Type: SwitchParameter
Parameter Sets: __AllParameterSets
Aliases:
Possible values:

Required: False
Position: named
Default value: False
Accept pipeline input: False
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • None

OUTPUTS

  • None
  • None