Thursday, May 3, 2018

Azure Setup public IP of existing VM - Powershell script

#Author : Neeraj

Get-AzurermVM -Name "mytestvm" -ResourceGroupName $saccount.ResourceGroupName | Set-AzureRmPublicIpAddress -PublicIpAddress $pip
Set-AzureRmPublicIpAddress -PublicIpAddress $pip
$pipnic=Get-AzureRmNetworkInterface -ResourceGroupName $saccount.ResourceGroupName -Name mytestvmnic
$pipnic.IpConfigurations[0].PublicIpAddress=$pip
Set-AzureRmNetworkInterface -NetworkInterface $pipnic

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...