Copy-CrmInstance
Copy a version 9 or later Dataverse production or sandbox environment to another sandbox environment in your Office 365 tenant.
Syntax
Copy-CrmInstance
-SourceInstanceIdToCopy <Guid>
-CopyInstanceRequestDetails <CopyRequest>
[-ApiUrl] <Uri>
[[-Credential] <PSCredential>]
[-TenantId <Guid>]
[-MaxCrmConnectionTimeOutMinutes <Int32>]
[-NonInteractive]
[<CommonParameters>]
Description
The Copy-CrmInstance cmdlet performs a copy operation on a Dataverse environment to another sandbox environment in your Office 365 tenant.
Examples
Example 1
Copy-CrmInstance -ApiUrl $connectionhost -CopyInstanceRequestDetails $CopyInstanceRequestDetails -Credential $cred -SourceInstanceIdToCopy <Guid>
Copies a environment environment in your Office 365 tenant from information specified in the object created by the New-CrmInstanceCopyRequestInfo cmdlet.
Parameters
-ApiUrl
URL of the Dataverse root service endpoint. For information about this parameter see Establish your credentials and connection.
Type: | Uri |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CopyInstanceRequestDetails
Object created by using the New-CrmInstanceCopyRequestInfo cmdlet that contains the information used to copy the environment.
Type: | CopyRequest |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Credential
User credential for signing in to Dataverse. For information about this parameter see Establish your credentials and connection.
Type: | PSCredential |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaxCrmConnectionTimeOutMinutes
Maximum number in minutes to wait before quitting the operation.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NonInteractive
Set to indicate a headless, non-interactive session that will not invoke a prompt, such as when authenticating and multi-factor authentication (MFA) is required.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SourceInstanceIdToCopy
Id of the environment to copy.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TenantId
Tenant ID to use for creating the authentication token, which is required for client Id and client secret authentication type.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Microsoft.Xrm.Services.Admin.Client.Models.CopyRequest
System.Management.Automation.SwitchParameter System.Uri System.Management.Automation.PSCredential System.Int32
Outputs
System.Object