How to SWAP VIP from Staging to Production using Power Shell Script

You can use the following Power Shell Script to Swap VIP from Staging slot to Production slot in Windows Azure when needed:

 

 

 ######################
# VIP Swap PS Script
######################
Add-PSSnapin AzureManagementToolsSnapIn
$service = "your_azure_service_name"
$sub = "your_subscription_id"
$cert = Get-ChildItem cert:\CurrentUser\Root\"your_certificate_thump_id_without_dash"
Get-Deployment -slot staging -serviceName $service -subscriptionId $sub -certificate $cert | Move-Deployment | Get-OperationStatus –WaitToComplete

 

 

More Info on Windows Azure Cmdlets:

https://blogs.msdn.com/b/avkashchauhan/archive/2011/02/07/windows-azure-service-management-cmdlets-are-update-for-windows-azure-sdk-1-3.aspx