i need your help! I'm trying to renew a dynamic IP assigned to a VM, but i want to figure it out if there's some possibility to accomplish this via powershell cmdlets without being in the need of shutting down and starting the VM again. I want to renew the public ip's assigned, regularly, but in a more efficient way.

  • Are you talking about the VIP or DIP? – proteus May 26 '16 at 20:10
  • there's no valid reason for doing this in a business setting – Sum1sAdmin May 26 '16 at 20:17
  • Im talking about the VIP. Actually i'm using Stop-AzureRmVM and Start-AzureRmVM to get a new IP from the pool, but i'm not convinced with this solution, it's not practical. In the classic panel, you could use Set-AzurePublicIP to asign an instance level public IP. But this cmdlet isn't working in the new panel. – mec94 May 27 '16 at 3:14
  • Can I ask why you want to do this? it might give us a better idea of how to help – Michael Brown May 27 '16 at 13:25
  • Well, actually i'm planning to mount something similar to a traffic exchange, using azure VPS available with the free trial, to send traffic to some websites. So i need to get new ip's constantly from the pool. – mec94 May 27 '16 at 16:36
ipconfig /release 
ipconfig /renew

You could use the above two commands to release and renew the given dynamic IP address. For further information open a windows-shell and type ipconfig --help
In the past they where commandline commands, but you can use them in powershell as well. If you want to renew the IP regularly you need to write a cronjob which execudes the two commands in the given intervals.

  • 1
    Hi, thanks for the answer. But im asking how to renew the public ip associated to the VM, without having to type in powershell Stop-AzureRmVM -ResourceGroupName Grupo1 -Name VM1 -Force Start-AzureRmVM -ResourceGroupName Grupo1 -Name VM1 – mec94 May 27 '16 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.