Created
December 7, 2017 08:02
-
-
Save naviat/66d87da2ff0f5ad5b9cfbbad3a796149 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$subscription = "[Subscription here]" | |
Select-AzureSubscription -SubscriptionName $subscription | |
$cloudservice = '[Cloud Service Here]' | |
Get-AzureVM -ServiceName $cloudservice | foreach { | |
$path = 'c:\vms' + $_.Name + '.xml' | |
Export-AzureVM -ServiceName $cloudservice -Name $_.Name -Path $path | |
} | |
# Faster way of removing all VMs while keeping the cloud service/DNS name | |
#Remove-AzureDeployment -ServiceName $cloudservice -Slot Production -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment