Hyper-V-Backup
4.2
This script creates a full backup of running Hyper-V Virtual Machines.
This script will:
Create a full backup of Virtual Machine(s), complete with configuration, snapshots/checkpoints, and VHD files.
If the -NoPerms switch is used, the script will shutdown the VM and copy all the files to the backup location, then start the VM.
You should use the -NoPerms switch if
This script will:
Create a full backup of Virtual Machine(s), complete with configuration, snapshots/checkpoints, and VHD files.
If the -NoPerms switch is used, the script will shutdown the VM and copy all the files to the backup location, then start the VM.
You should use the -NoPerms switch if
This script creates a full backup of running Hyper-V Virtual Machines.
This script will:
Create a full backup of Virtual Machine(s), complete with configuration, snapshots/checkpoints, and VHD files.
If the -NoPerms switch is used, the script will shutdown the VM and copy all the files to the backup location, then start the VM.
You should use the -NoPerms switch if Hyper-V does not have the appropriate permissions to the specified backup location to do an export.
If the -NoPerms switch is NOT used, the script will use the built-in export function, and the VMs will continue to run.
The -Keep switch should be used to keep the specified number of days worth of backups. For example, to keep one months worth of backups
use -Keep 30.
The -Compress switch should be used to generate a zip file of each VM that is backed up. The original backup folder will be deleted afterwards.
Important note: This script should be run on a Hyper-V host. The Hyper-V PowerShell management modules should be installed.
Please note: to send a log file using ssl and an SMTP password you must generate an encrypted
password file. The password file is unique to both the user and machine.
The command is as follows:
$creds = Get-Credential
$creds.Password | ConvertFrom-SecureString | Set-Content c:\foo\ps-script-pwd.txt
Show more
This script will:
Create a full backup of Virtual Machine(s), complete with configuration, snapshots/checkpoints, and VHD files.
If the -NoPerms switch is used, the script will shutdown the VM and copy all the files to the backup location, then start the VM.
You should use the -NoPerms switch if Hyper-V does not have the appropriate permissions to the specified backup location to do an export.
If the -NoPerms switch is NOT used, the script will use the built-in export function, and the VMs will continue to run.
The -Keep switch should be used to keep the specified number of days worth of backups. For example, to keep one months worth of backups
use -Keep 30.
The -Compress switch should be used to generate a zip file of each VM that is backed up. The original backup folder will be deleted afterwards.
Important note: This script should be run on a Hyper-V host. The Hyper-V PowerShell management modules should be installed.
Please note: to send a log file using ssl and an SMTP password you must generate an encrypted
password file. The password file is unique to both the user and machine.
The command is as follows:
$creds = Get-Credential
$creds.Password | ConvertFrom-SecureString | Set-Content c:\foo\ps-script-pwd.txt
Installation Options
Owners
Copyright
(C) Mike Galvin. All rights reserved.
Package Details
Author(s)
- Mike Galvin twitter.com/digressive
Tags
Hyper-V Virtual Machines Cluster CSV Full Backup Export Permissions Zip History
Dependencies
This script has no dependencies.
FileList
- Hyper-V-Backup.nuspec
- Hyper-V-Backup.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
24.8.29 | 270 | 8/30/2024 |
24.5.11 | 240 | 5/11/2024 |
24.3.21 | 177 | 3/21/2024 |
24.3.18 | 26 | 3/18/2024 |
24.3.8 | 34 | 3/11/2024 |
23.9.5 | 368 | 9/16/2023 |
23.4.28 | 279 | 4/28/2023 |
23.2.18 | 166 | 2/18/2023 |
23.2.7 | 26 | 2/9/2023 |
23.1.9 | 89 | 1/9/2023 |
22.6.22 | 379 | 6/22/2022 |
22.6.18 | 28 | 6/18/2022 |
22.6.17 | 21 | 6/17/2022 |
22.6.11 | 22 | 6/14/2022 |
22.3.26 | 148 | 3/27/2022 |
22.2.8 | 111 | 2/9/2022 |
22.1.19 | 74 | 1/20/2022 |
21.12.28 | 58 | 12/28/2021 |
21.11.9 | 94 | 11/12/2021 |
21.11.5 | 32 | 11/5/2021 |
21.8.10 | 153 | 8/10/2021 |
21.7.2 | 75 | 7/2/2021 |
21.6.14 | 54 | 6/14/2021 |
21.6.2 | 36 | 6/2/2021 |
21.5.30 | 22 | 5/30/2021 |
20.7.13 | 436 | 7/26/2020 |
20.3.20 | 242 | 3/20/2020 |
20.2.28 | 46 | 2/28/2020 |
20.2.14 | 50 | 2/17/2020 |
4.5 | 159 | 9/4/2019 |
4.4 | 99 | 5/26/2019 |
4.3 | 294 | 6/21/2018 |
4.2 (current version) | 101 | 3/4/2018 |
4.1 | 27 | 3/3/2018 |
4.0 | 36 | 1/15/2018 |
3.9 | 17 | 1/12/2018 |
3.8 | 17 | 1/12/2018 |
3.7 | 62 | 10/16/2017 |
3.6 | 42 | 10/6/2017 |
3.5.1 | 20 | 10/5/2017 |