Active Directory Management Framework

Configuration driven Active Directory management.

Register-DMWmiFilter

SYNOPSIS

Registers the definition of a WMI Filter as desired state.

SYNTAX

Register-DMWmiFilter [-Name] <String> [-Description] <String> [-Query] <String[]> [[-Namespace] <String>]
 [[-Author] <String>] [[-CreatedOn] <DateTime>] [[-ContextName] <String>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

Registers the definition of a WMI Filter as desired state.

EXAMPLES

EXAMPLE 1

Get-Content .\wmifilters.json | ConvertFrom-Json | Write-Output | Register-DMWmiFilter

Load up all settings defined in wmifilters.json

PARAMETERS

-Name

Name of the WMI Filter (must be unique in domain).

Type: String
Parameter Sets: (All)
Aliases:

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

-Description

A description of the WMI filter

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Query

The filter query/ies to apply. Can be multiple queries, defaults to the WMI namespace defined in the namespace parameter. To specify a namespace with the query, use this notation: {namespace};{query} (without the curly braces). Examples: SELECT * FROM Win32_OperatingSystem WHERE Caption like “Microsoft Windows 10%” root\CIMv2;SELECT * FROM Win32_OperatingSystem WHERE Caption like “Microsoft Windows 10%”

Type: String[]
Parameter Sets: (All)
Aliases:

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

-Namespace

The WMI namespace in which the queries will be executed by default. Defaults to: root\CIMv2

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: Root\CIMv2
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Author

The author of the WMI filter. Purely documentational. Defaults to: undefined

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: Undefined
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CreatedOn

The timestamp the WMI filter was defined at. Purely documentational. Defaults to: Get-Date

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: (Get-Date)
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ContextName

The name of the context defining the setting. This allows determining the configuration set that provided this setting. Used by the ADMF, available to any other configuration management solution.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: <Undefined>
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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

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

OUTPUTS

NOTES