Heads up: Changes in Veeam v12 PowerShell Module

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.

    Use Get-VBRApplicationGroup instead. The only parameter (name) is the same.

    Be aware of the behavior of Get-VBRApplicationGroup! If no application group is returned with parameter name 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.

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 jobtypebackup” 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 jobtypebackup” 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

Leave a Reply

Your email address will not be published. Required fields are marked *