你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzDataProtectionBackupVault
返回属于订阅的资源集合。
语法
Get-AzDataProtectionBackupVault
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzDataProtectionBackupVault
[-SubscriptionId <String[]>]
-ResourceGroupName <String>
-VaultName <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzDataProtectionBackupVault
[-SubscriptionId <String[]>]
-ResourceGroupName <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzDataProtectionBackupVault
-InputObject <IDataProtectionIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
返回属于订阅的资源集合。
示例
示例 1:获取给定订阅中的所有备份保管库
Get-AzDataProtectionBackupVault
ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type
---- ------------------- ---------------- ------------ -------- ---- ----
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned westus adigupt-backupcenter-ga-Vault Microsoft.DataProtection/backupVault
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned westcentralus BC-Usability-Vault-WCUS Microsoft.DataProtection/backupVault
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned centraluseuap NilayBackupVault Microsoft.DataProtection/backupVault
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned centraluseuap dpprunnervaultus Microsoft.DataProtection/backupVault
此命令获取当前订阅上下文中的所有备份保管库。 提供 SubscriptionId 参数以检索其他订阅中的备份保管库。
示例 2:获取给定资源组中的所有备份保管库。
Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName sarath-rg
ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type
---- ------------------- ---------------- ------------ -------- ---- ----
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned centraluseuap sarath-dppvault Microsoft.DataProtection/backupVaults
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned centraluseuap sarath-vault Microsoft.DataProtection/backupVaults
此命令获取给定资源组中的所有备份保管库。
示例 3:获取特定保管库。
Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault
ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type
---- ------------------- ---------------- ------------ -------- ---- ----
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned centraluseuap sarath-vault Microsoft.DataProtection/backupVaults
此命令按给定的保管库名称获取特定保管库。
示例 4:获取备份保管库的安全分数。
$vault = Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName hiaga-rg -VaultName hiaga-vault
$vault.SecureScore
Adequate
第一个命令按给定的保管库名称获取特定保管库,然后获取显示“足够”的保管库的安全分数。
示例 4:获取备份保管库的加密设置。
$vault = Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
$vault.EncryptionSetting |fl
$vault.EncryptionSetting.CmkIdentity |fl
$vault.EncryptionSetting.CmkKeyVaultProperty |fl
CmkIdentity : Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.CmkKekIdentity
CmkInfrastructureEncryption : Enabled
CmkKeyVaultProperty : Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.CmkKeyVaultProperties
State : Enabled
IdentityId : /subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourcegroups/jeevan-wrk-vms/providers/Microsoft.ManagedIdentity/userAssignedIdentities
/userMSIpstest
IdentityType : UserAssigned
KeyUri : https://jeevantestkeyvaultcmk.vault.azure.net/keys/pstest/3cd5235ad6ac4c11b40a6f35444bcbe1
第一个命令按给定的保管库名称获取特定的保管库,后续三个命令提取加密设置的规格。
参数
-DefaultProfile
DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
类型: | PSObject |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
类型: | IDataProtectionIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
资源组的名称。 此名称不区分大小写。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
目标订阅的 ID。 该值必须是 UUID。
类型: | String[] |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-VaultName
备份保管库的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |