Export-CMApplication

Exports an application.

Syntax

Export-CMApplication
      -Id <Int32>
      -Path <String>
      [-IgnoreRelated]
      [-OmitContent]
      [-Comment <String>]
      [-Force]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Export-CMApplication
      -InputObject <IResultObject>
      -Path <String>
      [-IgnoreRelated]
      [-OmitContent]
      [-Comment <String>]
      [-Force]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Export-CMApplication
      -Name <String>
      -Path <String>
      [-IgnoreRelated]
      [-OmitContent]
      [-Comment <String>]
      [-Force]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Export-CMApplication cmdlet exports an application to a file. Specify a file path to the location where you want to export the application.

Examples

Example 1: Get an application and export it

PS C:\> Get-CMApplication "Application01" | Export-CMApplication -Path "C:\test.zip" -IgnoreRelated -OmitContent -Comment "Application export" -Force

This command gets the application object named Applicaton01 and uses the pipeline operator to pass the object to Export-CMApplicaton. Export-CMApplication exports the application to the path C:\test.zip, omitting related content from the zip file, and not exporting related objects. Specifying the Force parameter indicates that the application is exported without prompting the user.

Example 2: Export an application

PS C:\>Export-CMApplication -Name "Application01" -Path "C:\test.zip" -IgnoreRelated -OmitContent -Comment "Application export"

This command exports the application named Application01 to the path C:\test.zip, omitting related content from the zip file, and not exporting related objects. Specifying the Force parameter indicates that the application is exported without prompting the user.

Required Parameters

-Id

Specifies the ID of the application to export.

Type:Int32
Aliases:CIId, CI_ID
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies an application object. To obtain an application object, use the Get-CMApplication cmdlet.

Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of the application to export.

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

Specifies a path for the package. The package file has a .zip extension.

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

Optional Parameters

-Comment

Specifies a comment for the exported application.

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

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

Performs the action without a confirmation message.

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

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

Indicates that related objects, such as application dependencies, superseded applications, or related categories and global conditions, are not exported.

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

Indicates that the cmdlet exports related content to a separate folder in the same location as the .zip file.

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