Am trying to use the PowerShell script for automating backups. Having some issues when adding more than one VM to backup, see below:
Code: Select all
# Names of VMs to backup separated by semicolon (Mandatory)
$VMNames = "LTBCC2L,LTBCC2L2"
# Name of vCenter or standalone host VMs to backup reside on (Mandatory)
$HostName = "Server1"
# Directory that VM backups should go to (Mandatory; for instance, C:\Backup)
$Directory = "D:\Backups\Veeam Backups\Test"
# 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 are required; Possible values: $True/$False)
$EnableQuiescence = $False
# 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 = "In1Week"
Code: Select all
Start-VBRZip : Cannot validate argument on parameter 'Entity'. The argument is null. Provide a valid value for the
argument, and then try running the command again.
At D:\Veeam\Electra.ps1:81 char:40
+ $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp ...
+ ~~~
+ CategoryInfo : InvalidData: (:) [Start-VBRZip], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip
Can any help me with this please?
Kind regards.