Restore-AzDevCenterUserDevBoxSnapshot
语法
Restore (默认值)
Restore-AzDevCenterUserDevBoxSnapshot
-Endpoint <String>
-DevBoxName <String>
-ProjectName <String>
-SnapshotId <String>
[-UserId <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreViaIdentity
Restore-AzDevCenterUserDevBoxSnapshot
-Endpoint <String>
-InputObject <IDevCenterdataIdentity>
-SnapshotId <String>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreByDevCenter
Restore-AzDevCenterUserDevBoxSnapshot
-DevCenterName <String>
-DevBoxName <String>
-ProjectName <String>
-SnapshotId <String>
[-UserId <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
RestoreViaIdentityByDevCenter
Restore-AzDevCenterUserDevBoxSnapshot
-DevCenterName <String>
-InputObject <IDevCenterdataIdentity>
-SnapshotId <String>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
示例
示例 1:按终结点和用户 ID 将 Dev Box 还原到快照
Restore-AzDevCenterUserDevBoxSnapshot `
-Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" `
-ProjectName "DevProject" `
-DevBoxName "myDevBox" `
-UserId "786a823c-8037-48ab-89b8-8599901e67d0" `
-SnapshotId "snapshot-1234"
此命令将分配给用户“786a823c-8037-48ab-89b8-8599901e67d0”的开发框“myDevBox”还原到使用终结点 ID 为“snapshot-1234”的快照。
示例 2:按开发人员中心名称和当前用户将 Dev Box 还原到快照
Restore-AzDevCenterUserDevBoxSnapshot `
-DevCenterName "ContosoDevCenter" `
-ProjectName "DevProject" `
-DevBoxName "myDevBox" `
-UserId "me" `
-SnapshotId "snapshot-1234"
此命令使用开发人员中心名称将分配给当前登录用户的开发框“myDevBox”还原到 ID 为“snapshot-1234”的快照。
$snapshotInput = @{
DevBoxName = "myDevBox"
UserId = "786a823c-8037-48ab-89b8-8599901e67d0"
ProjectName = "DevProject"
}
Restore-AzDevCenterUserDevBoxSnapshot `
-Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" `
-InputObject $snapshotInput `
-SnapshotId "snapshot-1234"
此命令使用终结点和标识对象将开发框“myDevBox”还原到 ID 为“snapshot-1234”的快照。
$snapshotInput = @{
DevBoxName = "myDevBox"
UserId = "me"
ProjectName = "DevProject"
}
Restore-AzDevCenterUserDevBoxSnapshot `
-DevCenterName "ContosoDevCenter" `
-InputObject $snapshotInput `
-SnapshotId "snapshot-1234"
此命令使用开发人员中心名称和标识对象将开发框“myDevBox”还原到 ID 为“snapshot-1234”的快照。
参数
-AsJob
以作业身份运行命令
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DefaultProfile
DefaultProfile 参数不起作用。
如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
参数属性
| 类型: | PSObject
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | AzureRMContext, AzureCredential |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DevBoxName
开发箱的显示名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
Restore
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
RestoreByDevCenter
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DevCenterName
要对其执行作的 DevCenter。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | DevCenter |
参数集
RestoreByDevCenter
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
RestoreViaIdentityByDevCenter
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Endpoint
要作的特定于 DevCenter 的 URI。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
Restore
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
RestoreViaIdentity
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
RestoreViaIdentity
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
RestoreViaIdentityByDevCenter
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-NoWait
异步运行命令
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ProjectName
项目的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
Restore
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
RestoreByDevCenter
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-SnapshotId
指定要用于还原作的快照 ID 的必需参数。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-UserId
用户的 AAD 对象 ID。
如果值为“me”,则从身份验证上下文中获取标识。
参数属性
| 类型: | String
|
| 默认值: | me |
| 支持通配符: | False |
| 不显示: | False |
参数集
Restore
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
RestoreByDevCenter
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出