다음을 통해 공유


Import-CrmPackage

Imports a package to a Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization.

Syntax

Import-CrmPackage
      -PackageName <String>
      [-PackageDirectory <String>]
      [-TimeOut <String>]
      [-UnpackFilesDirectory <String>]
      -CrmConnection <CrmServiceClient>
      [-AllowCustomCode <String>]
      [-RuntimePackageSettings <String>]
      [-LogWriteDirectory <String>]
      [-WhatIf]
      [-Confirm]

Description

The Import-CrmPackage cmdlet imports a package to a Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization. A package can contain solution files, files, or exported data files from the Configuration Migration tool, custom code that can run during or after the package is deployed to the Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization, and HTML content specific to the package that can display at the beginning and end of the package deployment process. The HTML content can be useful to provide a description of the solutions and files that are deployed in the package.

This cmdlet can be used with Dataverse and Dynamics 365 Customer Engagement (on-premises).

Examples

-------------------------- EXAMPLE 1 --------------------------

PS C:\>Import-CrmPackage -CrmConnection $CRMConn -PackageDirectory c:\UnifiedServiceDesk\USDPackageDeployer -PackageName microsoft.crm.unifiedservicedesk.packages.crmwebclientdemopackage.dll -UnpackFilesDirectory c:\UnpackedFiles -Verbose

This example imports the Unified Service Desk web client sample application package that is named microsoft.crm.unifiedservicedesk.packages.crmwebclientdemopackage.dll and available in the c:\UnifiedServiceDesk\USDPackageDeployer directory.

The -Verbose parameter at the end of the command is optional, and is used to display a detailed log of the activities performed during the package deployment process. For the -CrmConnection parameter, we pass the $CRMConn variable that stores the connection information. We used the Get-CrmConnection cmdlet earlier to store the connection information in the $CRMConn variable.

Parameters

-AllowCustomCode

For internal use only.

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

-CrmConnection

Connection object to the Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization. This is an initialized instance of the Microsoft.Xrm.Tooling.Connector class.

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

-LogWriteDirectory

Custom directory location to store the cmdlet log files. The directory must already exist, and the user who is running the cmdlet must have Write permission to the directory. You must also use the -Verbose parameter along with the -LogWriteDirectory parameter to be able to store the log files in a custom location.

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

-PackageDirectory

Directory where a package or packages can be found.

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

-PackageName

Name of the assembly (.dll) that contains the package definition.

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

-RuntimePackageSettings

Used to pass data at runtime to the package that is being deployed in a key=value format delimited by pipe (|): key1=value1|key2=value2|key3=value3. For example: LCID=1033|SkipChecks=true

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

-TimeOut

For internal use only.

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

-UnpackFilesDirectory

Directory where the files are extracted to. If your package doesn't have files that need to be unpacked or extracted, you don't have to specify this parameter.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet does not perform the import.

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