有人可以告诉我为什么每次尝试在Azure中使用Powershell创建NIC时,我都会继续显示图像中显示的错误吗?
谢谢
答案 0 :(得分:0)
您没有创建网络接口,而是尝试获取不存在的网络接口。要创建NIC,请使用以下过程:
# Get the Virtual Network
$VNET = Get-AzureRmVirtualNetwork -Name ‘Demo-vnet’ -ResourceGroupName ‘Demo’
# Get the Subnet Id
$SubnetID = (Get-AzureRmVirtualNetworkSubnetConfig -Name ‘default’ -VirtualNetwork $VNET).Id
# Create the Network Interface
New-AzureRmNetworkInterface -Name "NICFW" -ResourceGroupName "AdatumRG" -Location "East Us" -SubnetId $SubnetID
相应地更改变量并确保-Location参数与您的VNet位置匹配。