Veeam free Powershell script

From MyWiki
Revision as of 11:49, 7 March 2016 by George2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
##################################################################
 
#                   User Defined Variables
 
##################################################################
 
 
 
# Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2”
 
$VMNames = ""
 
 
 
# Name of vCenter or standalone host VMs to backup reside on (Mandatory)
 
$HostName = ""
 
 
 
# Directory that VM backups should go to (Mandatory; for instance, C:\Backup)
 
$Directory = ""
 
Optionally, you can change compression level and desired retention, disable VMware quiescence, enable encryption or even notification settings:
 
# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme)
 
$CompressionLevel = "5"
 
# Quiesce VM when taking snapshot (Optional; VMware Tools or Hyper-V Integration Components are required for this in the guest OS; Possible values: $True/$False)
 
$EnableQuiescence = $True
 
# Protect resulting backup with encryption key (Optional; $True/$False)
 
$EnableEncryption = $False
 
# Encryption Key (Optional; path to a secure string)
 
$EncryptionKey = ""
 
# Retention settings (Optional; by default, VeeamZIP files are not removed and kept in the specified location for an indefinite period of time.
 
# Possible values: Never, Tonight, TomorrowNight, In3days, In1Week, In2Weeks, In1Month)
 
$Retention = "Never"
 
If you like to get an email report once the backup is completed, you should additionally fill out the following notification settings.
 
##################################################################
 
# Notification Settings
 
##################################################################
 
# Enable notification (Optional)
 
$EnableNotification = $True
 
# Email SMTP server
 
$SMTPServer = ""
 
# Email FROM
 
$EmailFrom = ""
 
# Email TO
 
$EmailTo = ""
 
# Email subject
 
$EmailSubject = ""