< Back
Import-CrmPackage
Post
NAME Import-CrmPackage
SYNOPSIS
Imports a package to a Microsoft Dynamics CRM instance.
SYNTAX
Import-CrmPackage [-AllowCustomCode <String>] [-PackageDirectory <String>] [-TimeOut <String>]
[-UnpackFilesDirectory <String>] -CrmConnection <CrmServiceClient> -PackageName <String> [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Import-CrmPackage cmdlet imports a package to a CRM instance. A package can contain CRM 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 CRM instance, 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 applies to Microsoft Dynamics CRM Online and on-premises versions of Microsoft Dynamics CRM.
PARAMETERS
-AllowCustomCode <String>
For internal use only.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-CrmConnection <CrmServiceClient>
Connection object to the CRM instance. This is an initialized instance of the Microsoft.Xrm.Tooling.Connector
class.
Required? true
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PackageDirectory <String>
Directory where a package or packages can be found.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PackageName <String>
Name of the assembly (.dll) that contains the package definition.
Required? true
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TimeOut <String>
For internal use only.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-UnpackFilesDirectory <String>
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.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Import-CrmPackage -CrmConnection $CRMConn -PackageDirectory c:\\CRM\\SDK\\Tools\\PackageDeployer -PackageName
SampleCRMPackage.dll -UnpackFilesDirectory c:\\UnpackedFiles -Verbose
This example imports a package defined by SampleCRMPackage.dll, which is available in the
c:\\CRM\\SDK\\Tools\\PackageDeployer 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 CRM connection information. We used the Get-CrmConnection cmdlet earlier to store the CRM
connection information in the $CRMConn variable.
RELATED LINKS
Online help: https://technet.microsoft.com/en-us/lib ... 56301.aspx
SYNOPSIS
Imports a package to a Microsoft Dynamics CRM instance.
SYNTAX
Import-CrmPackage [-AllowCustomCode <String>] [-PackageDirectory <String>] [-TimeOut <String>]
[-UnpackFilesDirectory <String>] -CrmConnection <CrmServiceClient> -PackageName <String> [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Import-CrmPackage cmdlet imports a package to a CRM instance. A package can contain CRM 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 CRM instance, 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 applies to Microsoft Dynamics CRM Online and on-premises versions of Microsoft Dynamics CRM.
PARAMETERS
-AllowCustomCode <String>
For internal use only.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-CrmConnection <CrmServiceClient>
Connection object to the CRM instance. This is an initialized instance of the Microsoft.Xrm.Tooling.Connector
class.
Required? true
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PackageDirectory <String>
Directory where a package or packages can be found.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PackageName <String>
Name of the assembly (.dll) that contains the package definition.
Required? true
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-TimeOut <String>
For internal use only.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-UnpackFilesDirectory <String>
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.
Required? false
Position? named
Default value
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Import-CrmPackage -CrmConnection $CRMConn -PackageDirectory c:\\CRM\\SDK\\Tools\\PackageDeployer -PackageName
SampleCRMPackage.dll -UnpackFilesDirectory c:\\UnpackedFiles -Verbose
This example imports a package defined by SampleCRMPackage.dll, which is available in the
c:\\CRM\\SDK\\Tools\\PackageDeployer 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 CRM connection information. We used the Get-CrmConnection cmdlet earlier to store the CRM
connection information in the $CRMConn variable.
RELATED LINKS
Online help: https://technet.microsoft.com/en-us/lib ... 56301.aspx