Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Add-CMComplianceSettingWqlQuery

Adds a compliance setting wql query

Syntax

EmptyRule (Default)

Add-CMComplianceSettingWqlQuery
 -ClassName <String>
 -Namespace <String>
 -Property <String>
 -DataType <SettingDataType>
 -InputObject <PSObject>
 -Name <String>
 [-WhereClause <String>]
 [-Description <String>]
 [-NoRule]
 [-PassThru]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

ValueRule

Add-CMComplianceSettingWqlQuery
 -ClassName <String>
 -Namespace <String>
 -Property <String>
 -DataType <SettingDataType>
 -ExpectedValue <String[]>
 -ExpressionOperator <RuleExpressionOperator>
 -InputObject <PSObject>
 -Name <String>
 -RuleName <String>
 [-Remediate]
 [-WhereClause <String>]
 [-Description <String>]
 [-NoncomplianceSeverity <NoncomplianceSeverity>]
 [-PassThru]
 [-ReportNoncompliance]
 [-RuleDescription <String>]
 [-ValueRule]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

ExistentialRule

Add-CMComplianceSettingWqlQuery
 -ClassName <String>
 -Namespace <String>
 -Property <String>
 -DataType <SettingDataType>
 -Existence <ExistenceType>
 -InputObject <PSObject>
 -Name <String>
 -RuleName <String>
 [-WhereClause <String>]
 [-Description <String>]
 [-ExistentialRule]
 [-ExpectedValue <String[]>]
 [-ExpressionOperator <RuleExpressionOperator>]
 [-NoncomplianceSeverity <NoncomplianceSeverity>]
 [-PassThru]
 [-RuleDescription <String>]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1

PS XYZ:\>

Parameters

-ClassName

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DataType

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SettingDataType
Default value:None
Accepted values:String, Integer, DateTime, FloatingPoint, Version, StringArray, Boolean, IntegerArray
Supports wildcards:False
DontShow:False

Parameter sets

-Description

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Existence

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:ExistenceType
Default value:None
Accepted values:MustExist, MustNotExist, Occurs
Supports wildcards:False
DontShow:False

Parameter sets

-ExistentialRule

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ExpectedValue

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:ExpectedValues, ExpectedCount, ExpectedCounts

Parameter sets

-ExpressionOperator

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:RuleExpressionOperator
Default value:None
Accepted values:And, Or, Other, IsEquals, NotEquals, GreaterThan, LessThan, Between, NotBetween, GreaterEquals, LessEquals, BeginsWith, NotBeginsWith, EndsWith, NotEndsWith, Contains, NotContains, AllOf, OneOf, NoneOf, SetEquals, SubsetOf, ExcludesAll
Supports wildcards:False
DontShow:False

Parameter sets

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-InputObject

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SettingName

Parameter sets

-Namespace

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NoncomplianceSeverity

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:NoncomplianceSeverity
Default value:None
Accepted values:None, Informational, Warning, Critical, CriticalWithEvent
Supports wildcards:False
DontShow:False

Parameter sets

-NoRule

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:NoRules

Parameter sets

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet may not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Property

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Remediate

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ReportNoncompliance

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-RuleDescription

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-RuleName

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ValueRule

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

-WhereClause

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

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

Inputs

System.Management.Automation.PSObject

Outputs

System.Object


Feedback

Was this page helpful?