New-CMBaseline

Create a configuration baseline.

Syntax

New-CMBaseline
   [-AllowComanagedClients]
   [-Category <String[]>]
   [-Description <String>]
   -Name <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Use this cmdlet to create a configuration baseline. A baseline is a collection of configuration items that Configuration Manager uses to evaluate whether a computer complies with software requirements. For more information, see Create configuration baselines in Configuration Manager.

After you create a baseline, use the Set-CMBaseline cmdlet to add configuration items. Then use the New-CMBaselineDeployment cmdlet to deploy the baseline to a collection. When deployed, devices in that collection download the configuration baseline and assess compliance with it.

Note

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

Examples

Example 1: Create a configuration baseline

This command creates a baseline for compliance named Accounting Department baseline. The command specifies a description for the baseline.

New-CMBaseline -Name "Accounting Department baseline" -Description "Compliance standards for Accounting computers."

Parameters

-AllowComanagedClients

Add this parameter to always apply this baseline even for co-managed clients.

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

-Category

Specify an array of configuration category names to add to the configuration baselines. These categories improve searching and filtering. By default, the site includes the following categories for configuration baselines:

  • Client
  • IT Infrastructure
  • Line of Business
  • Server

To use another category, first add it with the New-CMCategory cmdlet and -CategoryType BaselineCategories parameter.

Type:String[]
Aliases:LocalizedCategoryInstanceNames
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specify an optional description for the baseline to help identify it.

Type:String
Aliases:LocalizedDescription
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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

-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

-Name

Specify a name for the configuration baseline.

Type:String
Aliases:LocalizedDisplayName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

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

Inputs

None

Outputs

IResultObject

Notes

For more information on this return object and its properties, see SMS_ConfigurationBaselineInfo server WMI class.