Test Post

This is a test post blog

this is some content

# =========================================================

#  POWERSHELL Script to swap environments between stage and

#  production for FFAgs

#

# MAKE SURE YOU UPDATE THE VARIABLES !!

# =========================================================

# Last update: 31/03/2016

# Updated by: N Rogoff

# =========================================================

# Run Status: OK

 

$subscriptionName = "Eircom Test"

$cloudServiceName = "ffags-test"

$reservedIPName = "AGSReservedIP"

 

#Login to Azure account (prompts for login). Unremark the next line if you require to log in.

#Add-AzureAccount

 

#Check if subscription exists

Get-AzureSubscription -SubscriptionName $subscriptionName

if($err)

{

Write-Host "!! ERROR !! - Subscription does not exist: " $subscriptionName

Return

}

else

{

# Select AzureSubscription as current

Select-AzureSubscription -SubscriptionName $subscriptionName

}

 

#check for AGSReservedIP reserved IPs

Get-AzureReservedIP -ReservedIPName $reservedIPName

 

#Get azure cloud services

Get-AzureService -ServiceName $cloudServiceName

if($err)

{

Write-Host "!! ERROR !! - Cloud Service does not exist: " $cloudServiceName

Return

}

 

# Remove from Service

Write-Host "Start removing IP association..."

 

Remove-AzureReservedIPAssociation -ReservedIPName $reservedIPName -ServiceName $cloudServiceName

if($err)

{

Write-Host "!! ERROR !! - Reserved IP Address does not exist: " $reservedIPName

Return

}

And this is normal again