Export-CMConfigurationItem
Saves a Configuration Manager configuration item to a file.
Syntax
SearchByNameMandatory (Default)
Export-CMConfigurationItem
[-Name] <String>
-Path <String>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SearchByIdMandatory
Export-CMConfigurationItem
[-Id] <Int32>
-Path <String>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SearchByValueMandatory
Export-CMConfigurationItem
[-InputObject] <IResultObject>
-Path <String>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Export-CMConfigurationItem cmdlet saves a Configuration Manager configuration item to a specified .cab file. You can specify items by ID, name, or by use of the Get-CMConfigurationItem cmdlet.
Configuration items contain one or more settings, along with compliance rules. For more information about configuration items, see Introduction to 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: Export an item using an ID
PS XYZ:\>Export-CMConfigurationItem -Id "16777568" -Path "C:\Exports\CI16777568.cab"
This command exports a configuration item with the identifier named 16777568 to the specified file.
Example 2: Export an item using a name
PS XYZ:\>Export-CMConfigurationItem -Name "ConfigItem76" -Path "C:\Exports\CIConfigItem76.cab"
This command exports a configuration item named ConfigItem76 to the specified file.
Example 3: Export an item using a variable
PS XYZ:\> $CIObj=Get-CMConfigurationItem -Id "16777568"
PS XYZ:\> Export-CMConfigurationItem -InputObject $CIObj -Path "C:\Exports\CI16777568.cab"
The first command gets a configuration item with the specified identifier and stores it in the $CIObj variable.
The second command exports the item in the $CIObj variable to the specified file.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-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
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-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
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Id
Specifies an array of identifiers for one or more configuration items. You can use a comma separated list.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | CIId, CI_ID |
Parameter sets
SearchByIdMandatory
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-InputObject
Specifies a configuration item object. To obtain a configuration item object, you can use the Get-CMConfigurationItem cmdlet.
Parameter properties
Type: | IResultObject |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
SearchByValueMandatory
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies an array of names of configuration items. You can use a comma separated list.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | LocalizedDisplayName |
Parameter sets
SearchByNameMandatory
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Path
Specifies a full file path for an export file.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | FileName, FilePath, ExportFilePath |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
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
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject
Outputs
System.Object
Related Links
- Introduction to Compliance Settings in Configuration Manager
- Get-CMConfigurationItem
- Get-CMConfigurationItemXMLDefinition
- Get-CMConfigurationItemHistory
- New-CMConfigurationItem
- Set-CMConfigurationItem
- Remove-CMConfigurationItem
- Import-CMConfigurationItem
- ConvertTo-CMConfigurationItem
- ConvertFrom-CMConfigurationItem