Export-CMConfigurationItem
Export-CMConfigurationItem
Saves a Configuration Manager configuration item to a file.
Syntax
Parameter Set: SearchByNameMandatory
Export-CMConfigurationItem -Name <String[]> -Path <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByIdMandatory
Export-CMConfigurationItem -Id <String[]> -Path <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByValueMandatory
Export-CMConfigurationItem -InputObject <IResultObject> -Path <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Export-CMConfigurationItem cmdlet saves a Microsoft System Center 2012 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. Items usually define a unit of configuration you want to. For more information about configuration items, see Introduction to Compliance Settings in Configuration Manager (https://go.microsoft.com/fwlink/?LinkId=211014).
Parameters
-Id<String[]>
Specifies an array of identifiers for one or more configuration items. You can use a comma separated list.
Aliases |
CIId |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject>
Specifies a configuration item object. To obtain a configuration item object, you can use the Get-CMConfigurationItem cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String[]>
Specifies an array of names of configuration items. You can use a comma separated list.
Aliases |
LocalizedDisplayName |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Path<String>
Specifies full file path for an export file.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Export an item using an ID
This command exports a configuration item with the specified identifier to the specified file.
PS C:\> Export-CMConfigurationItem -Id "16777568" -Path "C:\Exports\CI16777568.cab"
Example 2: Export an item using a name
This command exports a configuration item named ConfigItem76 to the specified file.
PS C:\> Export-CMConfigurationItem -Name "ConfigItem76" -Path "C:\Exports\CIConfigItem76.cab"
Example 3: Export an item using a variable
This example exports a configuration item.
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.
PS C:\> $CIObj=Get-CMConfigurationItem -Id "16777568"
PS C:\> Export-CMConfigurationItem -InputObject $CIObj -Path "C:\Exports\CI16777568.cab"