共用方式為


Restore-PowerAppEnvironment

Restores an environment.

Syntax

Restore-PowerAppEnvironment
       [-EnvironmentName] <String>
       [-RestoreToRequestDefinition] <Object>
       [[-WaitUntilFinished] <Boolean>]
       [[-TimeoutInMinutes] <Int32>]
       [[-ApiVersion] <String>]
       [<CommonParameters>]

Description

The Restore-PowerAppEnvironment cmdlet restores the specified Power Platform environment. Use Get-Help Restore-PowerAppEnvironment -Examples for more detail.

Examples

EXAMPLE 1

Restore-PowerAppEnvironment -EnvironmentName 0fc02431-15fb-4563-a5ab-8211beb2a86f -RestoreToRequestDefinition $restoreRequest

Restore environment 0fc02431-15fb-4563-a5ab-8211beb2a86f. $restoreRequest = [pscustomobject]@{ SourceEnvironmentId = 0fc02431-15fb-4563-a5ab-8211beb2a86f TargetEnvironmentName = "Restored Environment" TargetSecurityGroupId = "204162d5-59db-40c2-9788-2cda6b063f2b" RestorePointDateTime = $datetime.ToString("yyyy-MM-dd HH:mm:ss") SkipAuditData: true }

Parameters

-ApiVersion

The api version to call with.

Type:String
Position:5
Default value:2019-05-01
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnvironmentName

The target environment ID.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RestoreToRequestDefinition

The restore request definition object.

Type:Object
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TimeoutInMinutes

The timeout setting in minutes.

Type:Int32
Position:4
Default value:10080
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WaitUntilFinished

If set to true, the cmdlet doesn't return until completed.

Type:Boolean
Position:3
Default value:True
Required:False
Accept pipeline input:False
Accept wildcard characters:False