你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration
迁移现有的存储 Blob 容器,以启用不可变存储与版本控制。
语法
Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration
[-ResourceGroupName] <String>
[-StorageAccountName] <String>
-Name <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration
-Name <String>
-StorageAccount <PSStorageAccount>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration
-InputObject <PSContainer>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration cmdlet 迁移现有的存储 blob 容器,以启用不可变存储与版本控制。 仅当存储帐户已启用 Blob 版本控制并且容器已具有 ImmutabilityPolicy 时,该 cmdlet 才有效。
示例
示例 1:迁移现有存储 Blob 容器,以启用不可变存储(使用版本控制)。
$t = Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration -ResourceGroupName "myResourceGroup" -AccountName "mystorageaccount" -Name testcontainer -asjob
$t | Wait-Job
此命令迁移现有的存储 Blob 容器,以启用不可变存储与版本控制。 仅当存储帐户已启用 Blob 版本控制且容器已具有 ImmutabilityPolicy 时,该命令才有效。 由于命令将长时间运行,因此可以使用“-Asjob”异步运行它。
参数
-AsJob
在后台运行 cmdlet
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
存储容器对象
类型: | PSContainer |
别名: | Container |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Name
容器名称
类型: | String |
别名: | N, ContainerName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
资源组名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-StorageAccount
存储帐户对象
类型: | PSStorageAccount |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-StorageAccountName
存储帐户名称。
类型: | String |
别名: | AccountName |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |