Share via


Get-CrmPackages

Returns a list of available packages that can be imported to a Dataverse environment or Dynamics 365 Customer Engagement (on-premises) organization.

Syntax

Default (Default)

Get-CrmPackages
    [[-PackageName] <String>]
    [[-PackageDirectory] <String>]
    [-LogWriteDirectory <String>]

Description

The Get-CrmPackages cmdlet returns a list of packages. The cmdlet can also return information about a specific package if you specify the package name as a cmdlet parameter. A package can contain the following items: 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. This 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:\>Get-CrmPackages -PackageDirectory c:\UnifiedServiceDesk\USDPackageDeployer

This example returns a list of all packages available for import in the specified directory (in this case, c:\UnifiedServiceDesk\USDPackageDeployer).

-------------------------- Example 2 --------------------------

PS C:\>Get-CrmPackages -PackageDirectory c:\UnifiedServiceDesk\USDPackageDeployer -PackageName microsoft.crm.unifiedservicedesk.packages.crmwebclientdemopackage.dll

This example displays information about the Unified Service Desk web client sample application package available in the specified directory (in this case, c:\UnifiedServiceDesk\USDPackageDeployer). To display information about a package, you must specify the name of the assembly (in this case microsoft.crm.unifiedservicedesk.packages.crmwebclientdemopackage.dll) in the -PackageName parameter that contains the package definition.

Parameters

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PackageDirectory

Directory where a package or packages can be found.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-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

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

Outputs

List

This cmdlet exports a list of PackageInfo objects. The short name of this object can be used as input to the Import-CrmPackage cmdlet.