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– proteus2016-05-26 20:10:10 +00:00Commented May 26, 2016 at 20:10
- there's no valid reason for doing this in a business settingSum1sAdmin– Sum1sAdmin2016-05-26 20:17:08 +00:00Commented May 26, 2016 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– mec942016-05-27 03:14:31 +00:00Commented May 27, 2016 at 3:14
- Can I ask why you want to do this? it might give us a better idea of how to helpMichael Brown– Michael Brown2016-05-27 13:25:08 +00:00Commented May 27, 2016 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– mec942016-05-27 16:36:38 +00:00Commented May 27, 2016 at 16:36
| Show 1 more comment
1 Answer
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.
- 1Hi, 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 VM1mec94– mec942016-05-27 03:03:15 +00:00Commented May 27, 2016 at 3:03