Import-CrmOrganization
Applies To: CRM 2015 on-prem
Import-CrmOrganization
Initiates the process to import a Microsoft Dynamics CRM organization database into the deployment.
Syntax
Parameter Set: Default
Import-CrmOrganization [-SqlServerName] <String> [-DatabaseName] <String> [-SrsUrl] <String> [[-DisplayName] <String> ] [[-Name] <String> ] [-UserMappingMethod] <ImportUserMappingMethod> {KeepExisting | ByAccount | ByMappingXml | ByFullName | ByMappingXmlFile} [[-UserMappingXml] <String> ] [[-UserMappingXmlFile] <String> ] [-Credential <PSCredential> ] [-Diag] [-DwsServerUrl <String> ] [-Timeout <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Import-CrmOrganization cmdlet initiates the process to import a Microsoft Dynamics CRM organization database into the deployment. If desired, you can provide new names and other information for the organization. If the specified organization database needs to be upgraded, this occurs as part of this operation. This is an asynchronous operation. You must poll the operation status with Get-CrmOperationStatus to determine when the operation is complete.
Parameters
-Credential<PSCredential>
Specifies the credentials used to log in to the Deployment web service.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DatabaseName<String>
Specifies the name of the organization database to import. The organization database should already be imported into the computer that’s running Microsoft SQL Server.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Diag
Turns on stack traces for error reports returned from Microsoft Dynamics CRM service calls. Enabling this emits a detailed error message, including a stack trace, when an error is encountered by the CRM PowerShell command.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-DisplayName<String>
Specifies the friendly name of the organization. If no friendly name is provided, it defaults to the existing friendly name in the organization database that’s being imported.
Aliases |
none |
Required? |
false |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-DwsServerUrl<String>
Identifies the location of the Deployment web service.This should be in the format: http://<serverurl>
or https://<serverurl>
, for example, http://contoso
.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the unique name of the organization. If no unique name is provided, it defaults to the existing unique name in the organization database being imported.
Aliases |
none |
Required? |
false |
Position? |
5 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-SqlServerName<String>
Specifies the name of the computer that’s running SQL Server that hosts the organization database to import.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-SrsUrl<String>
Specifies the name of the Microsoft SQL Server Reporting Services report server for the organization being imported.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Timeout<Int32>
For internal use only.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-UserMappingMethod<ImportUserMappingMethod>
Specifies a string that indicates how to map the users in the organization. Possible values are: KeepExisting, ByAccount, ByMappingXml, or ByMappingXmlFile.
Aliases |
none |
Required? |
true |
Position? |
7 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UserMappingXml<String>
Specifies the string containing the XML mapping. The UserMappingXml parameter is only required and used if the UserMappingMethod is set to ByMappingXml. In all other cases, this parameter is ignored.
Aliases |
none |
Required? |
false |
Position? |
8 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UserMappingXmlFile<String>
Specifies the string containing the file name for the XML user mapping file. The UserMappingXmlFile parameter is only required and used if the UserMappingMethod is set to ByMappingXmlFile. In all other cases, this parameter is ignored.
Aliases |
none |
Required? |
false |
Position? |
9 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
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, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
-------------------------- EXAMPLE 1 --------------------------
This example begins the import process for an organization into the Microsoft Dynamics CRM deployment. You can see the progress of the operation with the query: Get-CrmOperationStatus –OperationId $importJobId
PS C:\> $importJobId = Import-CrmOrganization –DatabaseName m2_MSCRM –SqlServerName localhost –SrsUrl HYPERLINK "https://localhost/reportserver" https://localhost/reportserver -UserMappingMethod ByAccount
PS C:\>