Export and re-Provision your Azure VM with Azure PowerShell



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.


Export VM


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!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.