这是我的代码的一部分
$keyVaults = Get-AzkeyVault | Sort-Object VaultName
foreach($keyVault in $keyVaults) {
$kvName = $keyVault.VaultName
$keyVault | Get-Member
这将导致 $keyVault 成为 PSKeyVaultIdentityItem 类,并且输出显示
TypeName: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultIdentityItem
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Location Property string Location {get;set;}
ResourceGroupName Property string ResourceGroupName {get;set;}
ResourceId Property string ResourceId {get;set;}
Tags Property hashtable Tags {get;set;}
TagsTable Property string TagsTable {get;}
VaultName Property string VaultName {get;set;}
但是,我的 AccessPolicies 属性在哪里。当我计数时,我得到 0,尽管在门户中我看到了几个......
克鲁,哈里