how to backup hyper-v VM using Powershell command line

Example 1

Exports virtual machine Test to the root of the D drive.

PS C:\> Export-VM –Name Test –Path D:\

Example 2

Exports all virtual machines to the root of the D drive. Each virtual machine will be exported to its own folder.

PS C:\> Get-VM | Export-VM –Path D:\

Adding -Asjob option in the end of line will run the above command in background releasing the prompt free.

eg.

PS C:\> Export-VM –Name Test –Path D:\ -Asjob

 

 

Ref: http://technet.microsoft.com/en-us/library/hh848491.aspx

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s