Skip to content

Instantly share code, notes, and snippets.

@Dalmirog-zz
Created February 22, 2016 22:29
Show Gist options
  • Save Dalmirog-zz/5562af0dd70571cc2996 to your computer and use it in GitHub Desktop.
Save Dalmirog-zz/5562af0dd70571cc2996 to your computer and use it in GitHub Desktop.
BrianH script
$cloudservice= 'rdc-sb-test-auto7'
Get-AzureAccount -debug
#Change: added -debug to the cmdlet
$existingcloudservice= Get-AzureService -ServiceName $cloudservice -ErrorActionSilentlyContinue -debug
if ($existingcloudservice) {
Write-Host "Cloud Service named $cloudservice already exists, no need to provision it."
}
else {
Write-Host "Creating new Cloud Service named $cloudservice in "North Central US"..."
New-AzureService -ServiceName "$cloudservice" -Label "$cloudservice" -Location "North Central US" -debug
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment