Add-​CM​Compliance​Setting​Script

Adds a compliance setting script

Syntax

Add-CMComplianceSettingScript
   [-Confirm]
   -DataType <SettingDataType>
   [-Description <String>]
   [-DisableWildcardHandling]
   [-DiscoveryScriptFile <String>]
   -DiscoveryScriptLanguage <ScriptingLanguage>
   [-DiscoveryScriptText <String>]
   -Existence <ExistenceType>
   [-ExistentialRule]
   [-ExpectedValue <String[]>]
   [-ExpressionOperator <RuleExpressionOperator>]
   [-ForceWildcardHandling]
   -InputObject <PSObject>
   [-Is64Bit]
   [-IsPerUser]
   -Name <String>
   [-NoncomplianceSeverity <NoncomplianceSeverity>]
   [-PassThru]
   [-RemediationScriptFile <String>]
   [-RemediationScriptLanguage <ScriptingLanguage>]
   [-RemediationScriptText <String>]
   [-RuleDescription <String>]
   -RuleName <String>
   [-WhatIf]
   [<CommonParameters>]
Add-CMComplianceSettingScript
   [-Confirm]
   -DataType <SettingDataType>
   [-Description <String>]
   [-DisableWildcardHandling]
   [-DiscoveryScriptFile <String>]
   -DiscoveryScriptLanguage <ScriptingLanguage>
   [-DiscoveryScriptText <String>]
   -ExpectedValue <String[]>
   -ExpressionOperator <RuleExpressionOperator>
   [-ForceWildcardHandling]
   -InputObject <PSObject>
   [-Is64Bit]
   [-IsPerUser]
   -Name <String>
   [-NoncomplianceSeverity <NoncomplianceSeverity>]
   [-PassThru]
   [-RemediationScriptFile <String>]
   [-RemediationScriptLanguage <ScriptingLanguage>]
   [-RemediationScriptText <String>]
   [-ReportNoncompliance]
   [-RuleDescription <String>]
   -RuleName <String>
   [-ValueRule]
   [-WhatIf]
   [<CommonParameters>]
Add-CMComplianceSettingScript
   [-Confirm]
   -DataType <SettingDataType>
   [-Description <String>]
   [-DisableWildcardHandling]
   [-DiscoveryScriptFile <String>]
   -DiscoveryScriptLanguage <ScriptingLanguage>
   [-DiscoveryScriptText <String>]
   [-ForceWildcardHandling]
   -InputObject <PSObject>
   [-Is64Bit]
   [-IsPerUser]
   -Name <String>
   [-NoRule]
   [-PassThru]
   [-RemediationScriptFile <String>]
   [-RemediationScriptLanguage <ScriptingLanguage>]
   [-RemediationScriptText <String>]
   [-WhatIf]
   [<CommonParameters>]

Description

{{Fill in the Description}}

Examples

Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Required Parameters

-DataType

{{Fill DataType Description}}

Type:SettingDataType
Parameter Sets:String, DateTime, Integer, FloatingPoint, Version, Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiscoveryScriptLanguage

{{Fill DiscoveryScriptLanguage Description}}

Type:ScriptingLanguage
Parameter Sets:PowerShell, VBScript, JScript, ShellScript
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Existence

{{Fill Existence Description}}

Type:ExistenceType
Parameter Sets:MustExist, MustNotExist, Occurs
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExistentialRule

{{Fill ExistentialRule Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

{{Fill InputObject Description}}

Type:PSObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

{{Fill Name Description}}

Type:String
Aliases:SettingName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RuleName

{{Fill RuleName Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ValueRule

{{Fill ValueRule Description}}

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

{{Fill Description Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiscoveryScriptFile

{{Fill DiscoveryScriptFile Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiscoveryScriptText

{{Fill DiscoveryScriptText Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExpectedValue

{{Fill ExpectedValue Description}}

Type:String[]
Aliases:ExpectedValues, ExpectedCount, ExpectedCounts
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExpressionOperator

{{Fill ExpressionOperator Description}}

Type:RuleExpressionOperator
Parameter Sets:And, Or, Other, IsEquals, NotEquals, GreaterThan, LessThan, Between, NotBetween, GreaterEquals, LessEquals, BeginsWith, NotBeginsWith, EndsWith, NotEndsWith, Contains, NotContains, AllOf, OneOf, NoneOf, SetEquals, SubsetOf, ExcludesAll, And, Or, Other, IsEquals, NotEquals, GreaterThan, LessThan, Between, NotBetween, GreaterEquals, LessEquals, BeginsWith, NotBeginsWith, EndsWith, NotEndsWith, Contains, NotContains, AllOf, OneOf, NoneOf, SetEquals, SubsetOf, ExcludesAll
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Is64Bit

{{Fill Is64Bit Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsPerUser

{{Fill IsPerUser Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NoRule

{{Fill NoRule Description}}

Type:SwitchParameter
Aliases:NoRules
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NoncomplianceSeverity

{{Fill NoncomplianceSeverity Description}}

Type:NoncomplianceSeverity
Parameter Sets:None, Informational, Warning, Critical, CriticalWithEvent
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

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

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemediationScriptFile

{{Fill RemediationScriptFile Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemediationScriptLanguage

{{Fill RemediationScriptLanguage Description}}

Type:ScriptingLanguage
Parameter Sets:PowerShell, VBScript, JScript, ShellScript
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemediationScriptText

{{Fill RemediationScriptText Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReportNoncompliance

{{Fill ReportNoncompliance Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RuleDescription

{{Fill RuleDescription Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.Management.Automation.PSObject

Outputs

System.Object