我通过调用以下 cmdlet 通过 Az 模块访问 Azure:
$key = Get-AzKeyVaultKey -VaultName "myName" -Name "myKeyName"
Get-AzKeyVaultKey
[-VaultName] <String>
[[-Name] <String>]
[-InRemovedState]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
但我收到以下错误:
Get-AzKeyVaultKey :值不能为空。
参数名称:keyVaultDnsSuffix
在 line:1 char:8 + $key = Get-AzKeyVaultKey -VaultName "myName" -Name "myKeyName" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-AzKeyVaultKey], ArgumentNullException + FullyQualifiedErrorId:Microsoft.Azure.Commands.KeyVault.GetAzureKeyVaultKey
PS C:\Windows\system32> (Get-AzKeyVault -VaultName "myName").NetworkAcls
默认操作:允许
绕过:AzureServices
IP 地址范围:
IpAddressRangesText :
VirtualNetworkResourceIds:
VirtualNetworkResourceIdsText :
通过 Azure CloudShell 遇到相同的异常: