Heads up: Changes in Veeam v12 PowerShell Module
These days I reviewed a few PowerShell scripts for Veeam Backup & Replication I created some times ago. Long before v12 went GA. I want to share the changes in Veeam v12 PowerShell Module that made scripts crashing or, even worse, lead to total wrong results.
Currently I found two areas with important changes in the Veeam VBR PowerShell module. SureBackup and querying for backup jobs.
SureBackup
There are great improvements in v12 in this area as the Universal SureBackup Job. This allows you to test VMs and physical servers within the same SureBackup job. Because of this, some cmdlets became obsolete with v12.
Get-VSBApplicationGroup
Becomes obsolete and cannot be used in v12 any more. Your script will crash.
UseGet-VBRApplicationGroup
instead. The only parameter (name
) is the same.
Be aware of the behavior ofGet-VBRApplicationGroup
! If no application group is returned with parametername
used, the cmdlet ends in an error instead of continuing silently. This also cause your script fail. To avoid this, you can use-ErrorAction Ignore
as additional parameter.
Add-VBRViApplicationGroup
Also obsolete in v12. Replace it byAdd-VBRApplicationGroup
. Both cmdlets uses the same parameters. Therefore the replacement should work fine.Get-VSBJob
Obsolete, replace it byGet-VBRSureBackupJob
. Be aware of the same behavior asGet-VBRApplicationGroup
. There is a error when no object is returned with parameter selected.Add-VBRViSureBackupJob
Obsolete, replace it byAdd-VBRSureBackupJob
. Here, same parameters are used too.Set-VBRViSureBackupJob
Replace it bySet-VBRSureBackupJob
.
Querying for backup jobs
With obsolete commands – like with SureBackup – the script will crash. So it is obvious there is something wrong. More subtle are the changes when no errors occur, but the result is wrong. I found out there are more different options for jobtype
available in certain cmdlets. With v11 jobtype
“backup
” was for normal backup jobs. This type is still available in v12 but just for backups with not upgraded backup chain. If chain was upgraded, jobtype
is “PerVmParentBackup
“. This also applies to jobs created with v12.
This new type I found in cmdlet Get-VBRBackup
. For example, in Get-VBRBackupSession
jobtype
“backup
” is still used as in v11. So this change is not trivial and you should check your scripts if you are using jobtype
at all. If so, test it!
Notes
- See also the full list of obsolete PowerShell cmdlets in v12.
- At the moment of writing changes in
jobtype
is not documented online. Also did not find hints in v12 changelog. - See my series about what else is new in Veeam VBR v12