Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Import-CrmPackage
Imports a package to a Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization.
Syntax
Default (Default)
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.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-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.
Parameter properties
| Type: | CrmServiceClient |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PackageDirectory
Directory where a package or packages can be found.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PackageName
Name of the assembly (.dll) that contains the package definition.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-TimeOut
For internal use only.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet does not perform the import.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
