Created
December 6, 2017 16:36
-
-
Save tomfanning/babf69c576e02b913cc27f0d9224840e to your computer and use it in GitHub Desktop.
Back up Hyper-V VMs to a network share
This file contains 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
$errorActionPreference='Stop'; | |
remove-item -recurse -force c:\backup\tsl.prev -ErrorAction Ignore | |
rename-item c:\backup\tsl c:\backup\tsl.prev | |
get-vm | where-object -Property Name -like 'tsl.*' | export-vm -path c:\backup\tsl; | |
robocopy C:\backup\TSL \\sg-81-vmhost\usb-backup\TSL *.* /mir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment