如何分离/分离ARM VM的公共IP [英] How to detach/dissociate public IP of ARM VM
本文介绍了如何分离/分离ARM VM的公共IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有公共IP的ARM VM.我想在测试后分离/解除此公共IP的关联.我可以看到有一个使用天蓝色门户网站的选项-
I have an ARM VM with a public IP. I want to detach/dissociate this public IP after my test. I can see there is an option using azure portal-
我想使用azure powershell做同样的事情.我尝试找到与公共IP相关的Azure cmdlet,但无法实现. 如果有人可以给我一些线索,怎么办呢?
I want to do the same thing using azure powershell. I tried finding azure cmdlets related to public IP but couldn't achieve it. If someone can give me some clue how this can be done ?
推荐答案
您需要获取网络接口对象并从中删除IP地址ID,然后将更改推回Azure.
You need to get the Network Interface object and remove the Ip Address Id from it and push changes back to Azure.
$nic = Get-AzureRmNetworkInterface -Name bla -ResourceGroup blabla
$nic.IpConfigurations.publicipaddress.id = $null
Set-AzureRmNetworkInterface -NetworkInterface $nic
许多Azure cmdlet以类似的方式工作.
Many Azure cmdlets work in similar fashion.
这篇关于如何分离/分离ARM VM的公共IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文