Edit

Share via


Import-CMConfigurationItem

Imports Configuration Manager configuration items.

Syntax

Import-CMConfigurationItem
      [-DuplicateWhileImporting]
      -FileName <String[]>
      [-Force]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Import-CMConfigurationItem cmdlet imports Configuration Manager configuration items from one or more cabinet files. The files that you import must conform to the Service Modeling Language (SML) schema and can contain information about configuration data from one of the following sources:

  • Best practices from a Configuration Manager Configuration Pack.
  • Configuration data that you have externally authored and packaged into a cabinet (.cab) file.
  • Configuration data exported from Configuration Manager.

Configuration items contain one or more settings, along with compliance rules. Items usually define a unit of configuration you want to monitor.

Note

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

Examples

Example 1: Import configuration items

PS XYZ:\>Import-CMConfigurationItem -FileName "\\atc-dist-01\Public\CM\AdminUITeam\CIData\7389_OSCI.cab","\\atc-dist-01\Public\CM\AdminUITeam\CIData\7452OS_1.cab"

This command imports configuration items from the files 7389_OSCI.cab and 7452OS_1.cab.

Example 2: Import configuration items and create duplicate configuration items

PS XYZ:\>Import-CMConfigurationItem -FileName "\\Contoso01\Public\CM\7389_OSCI.cab","\\ Contoso01\Public\CM\7452OS_1.cab" -DuplicateWhileImporting

This command imports configuration items from the files 7389_OSCI.cab and 7452OS_1.cab. The DuplicateWhileImporting parameter indicates that imports configuration items that exist in Configuration Manager as duplicate configuration items.

Parameters

-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

-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

-DuplicateWhileImporting

Indicates that Configuration Manager imports configuration items that exist in Configuration Manager as duplicate configuration items.

Use this parameter to create a configuration item when you want an exact copy of a configuration item that you import to use as your starting point, but you want to modify it to create an independent configuration item from the original.

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

-FileName

Specifies an array of names of cabinet (cab) files.

Type:String[]
Aliases:FilePath, ImportFilePath, Path, FileNames, FilePaths, ImportFilePaths, Paths
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Use this parameter to create a configuration item when you want an exact copy of a configuration item that you import to use as your starting point, but you want to modify it to create an independent configuration item from the original.

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.

Use this parameter to create a configuration item when you want an exact copy of a configuration item that you import to use as your starting point, but you want to modify it to create an independent configuration item from the original.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object