For PowerShell users out there. You can administer your Azure VM more fun with Windows Azure Powershell.
Before We start our exporting and re-provisioning mission, We do need some preparations beforehand.
1. Please install Windows Azure Powershell either on your desktop or your bastion host. Download here.
2. Run Windows Azure Powershell with your Administrator account.
3. Type : set-executionpolicy remotesigned
4. Type : Import-Module Azure
5. Type : Get-AzurePublishSettingsFile or Go to Windows Azure Publishsettings link here to get your *.publishsettings file.
6. Type: Import-AzurePublishSettingsFile “C:\Folder\full_path_to_saved_file.publishsettings”
And… We are Ready to Rock!
Please ensure You have deployed some VM on Windows Azure or if You haven’t please do so.
Export VM
Use below Snippet by changing “yourVM” with your VM name on Azure. Please change your the $ExportPath as You wish.
Delete VM
Use below Snippet to delete your VM on Azure.
Re-Provision VM
Use below Snippet to re-Provision your VM.
To the Kloud!