Get-CMComplianceSetting
Get a setting for a configuration item.
Syntax
Get-CMComplianceSetting
[-Fast]
[-Id] <Int32>
[-SettingName <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Get-CMComplianceSetting
[-Fast]
-InputObject <IResultObject>
[-SettingName <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Get-CMComplianceSetting
[-Fast]
[-Name] <String>
[-SettingName <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Description
Use this cmdlet to get a setting for a configuration item. Settings represent the business or technical conditions to assess compliance on client devices. Configure a new setting or browse to an existing setting on a reference computer. For more information, see Get started with compliance settings in Configuration Manager.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
Examples
Example 1: Get the location for a setting in a configuration item
This example queries the setting named appevents for the configuration item Windows health check and returns just the location attribute. This attribute includes the registry or file path for the setting.
Get-CMComplianceSetting -Name "Windows health check" -SettingName "appevents" -Fast | Select-Object Location
Parameters
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Fast
Add this parameter to not automatically refresh lazy properties. Lazy properties contain values that are relatively inefficient to retrieve. Getting these properties can cause additional network traffic and decrease cmdlet performance.
If you don't use this parameter, the cmdlet displays a warning. To disable this warning, set $CMPSSuppressFastNotUsedCheck = $true
.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
Specify the CI_ID for the configuration item that has the setting you want to get. For example, 258895
.
Type: | Int32 |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specify a configuration item object that has the setting you want to get. To get this object, use the Get-CMConfigurationItem.
Type: | IResultObject |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specify the name of the configuration item that has the setting you want to get.
Type: | String |
Aliases: | LocalizedDisplayName |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SettingName
Specify the name of the setting in the configuration item. This value is the same as the Name value on the Settings tab of the configuration item properties in the console.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject
Outputs
Microsoft.ConfigurationManagement.DesiredConfigurationManagement.ConfigurationItemSetting