Restore-CrmInstance
Restores a Dataverse environment from the specified source and target ids.
Syntax
Restore-CrmInstance
-SourceInstanceId <Guid>
-TargetInstanceId <Guid>
-RestoreTimeUtc <DateTimeOffset>
[-FriendlyName <String>]
[-SecurityGroupId <Guid>]
[-ValidateOnly]
[-ApiUrl] <Uri>
[[-Credential] <PSCredential>]
[-TenantId <Guid>]
[-MaxCrmConnectionTimeOutMinutes <Int32>]
[-NonInteractive]
[<CommonParameters>]
Description
The Restore-CrmInstance cmdlet restores a Dataverse environment from the specified source and target ids.
Examples
Example 1
PS C:\> Restore-CrmInstance -SourceInstanceId <Guid> -TargetInstanceId <Guid> -RestoreTimeUtc <DateTimeOffset> -ApiUrl $connectionhost -Credential $cred
Restores an environment from the specified source and target ids.
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 |
-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 |
-FriendlyName
Allows you to change the friendly name on restore.
Type: | String |
Position: | Named |
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 |
-RestoreTimeUtc
Backup time stamp to restore to. The time format can be any valid string that can be serialized into DateTime, such as 3/30/2020 10:14:24 PM..
Type: | DateTimeOffset |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SecurityGroupId
Allows you to change the security group on restore.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SourceInstanceId
Id of the specific Dataverse environment where a backup was made that you want to restore. Use the Get-CrmInstances cmdlet to find all Ids within the same tenant.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TargetInstanceId
Instance Id the specific Dataverse environment where you want to restore the backup. Use the Get-CrmInstances cmdlet to find all instance Ids within the same tenant.
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 |
-ValidateOnly
Validates whether the operation will succeed without committing any changes.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
System.Guid
Microsoft.Xrm.Services.Admin.Client.Models.InstanceRestorePoint System.Uri System.Management.Automation.PSCredential System.Int32
Outputs
System.Object