Veeam PowerShell inconsistencies

I enjoy using Microsoft Windows PowerShell. I think it is great that more third-parties are creating PowerShell interfaces to their own products. VMware has vSphere PowerCLI and Pure Storage has its PowerShell Toolkit.

This week, I began learning and using Veeam PowerShell to manage my Veeam Backup and Replication servers and jobs. Unfortunately, I’m finding portions of Veeam’s PowerShell implementation to be inconsistent, incorrect, poorly documented, and frustrating to use.

Incorrect Spelling

I first experienced some frustrations with Veeam PowerShell when using the Set-VBRJobSchedule cmdlet, which has the following documented syntax:

Set-VBRJobSchedule -Job  [-Periodicaly] [-FullPeriod ] [-PeriodicallyKind ])

At first, I thought both the online and Get-Help documentation was incorrectly spelling the parameter -Periodicaly, particularly since a following parameter (-PeriodicallyKind) was spelled correctly.

It turns out that the documentation is correct and that the PowerShell syntax is where the misspelling resides. I misspell things all of the time, but it’s frustrating when the mistake is within the programming language.

Inconsistent

Several cmdlets use the parameter -Job to name one or more backup jobs, while others use -Name instead.

While they have sightly different descriptions and function, it can be confusing to remember which cmdlet uses which parameter. It would be nicer if only one parameter name was used and it had the same functionality for each cmdlet.

  • Job: Specifies the job you want to set schedule to. You can assign multiple jobs to this object.
  • Name: Specifies the name of the job you want to get, or search conditions. You can specify multiple names separated by commas.

Poorly Documented (and inconsistent)

Both Set-VBRJobVssOptions and Set-VBRJobObjectVssOptions have a similar parameter called -Credential(s). Here are their syntax:

Set-VBRJobVssOptions [-Job]  [-Options]  -Credential  [-WarningAction ] [-WarningVariable ] []
Set-VBRJobObjectVssOptions [-Object]  -Credentials  [-WarningAction ] [-WarningVariable ] []

Notice how Set-VBRJobVssOptions spells its parameter using the singlar form -Credential while the Set-VBRJobObjectVssOptions uses the plural form -Credentials.

Regardless of their tense differences, I cannot get either to work and there are no documented examples of how the values for these two parameters should be formed.

In my environment, if I run the cmdlet Get-VBRCredentials, I get the following result.

PS C:> Get-VBRCredentials

Name Description ---- ----------- domain\VeeamBAR domain\VeeamBAR root FLR helper appliance credentials

So if I pass that result to a new PowerShell variable, I think I should be able to use it as a value for another parameter, like so:

PS C:> $VBRCredentials = Get-VBRCredentials -Name "*veeam*"
PS C:> $VBRCredentials

Name Description ---- ----------- domain\VeeamBAR domain\VeeamBAR

PS C:> Get-VBRJob -Name "Test-Job" | Set-VBRJobVssOptions -Options $SomeOptionsIDefinedViaNewVBRJobVssOptions -Credential $VBRCredentials

The Set-VBRJobVssOptions cmdlet works if I do not include the -Credential parameter. I’ve tried the following values for the -Credential parameter:

-Credentials domain\VeeamBAR
-Credentials "domain\VeeamBAR"
-Credentials $VBRCredentials
-Credentials $VBRCredentials.Name

None of them work. And since there are no documented examples of how to use the -Credential(s) parameter for these two cmdlets, I might not ever figure out how to provide it an acceptable value. Perhaps my forum Set-VBRJobObjectVssOptions -Credentials will provide the answer.

Update: March 14

I’ve learned a bit more about Veeam PowerShell and its documentation inconsistencies thanks to both trial and error and this Veeam forum.

Get-Help documentation is better than online documentation

In most cases, the online Veeam PowerShell documentation is more misleading and inaccurate than the inline documentation that is retrieved via Get-Help “Name of cmdlet” -full. Here are a few examples:

Set-VBRJobVssOptions

The online Set-VBRJobVssOptions Syntax shows that this cmdlet may use three parameters at the same time:

Set-VBRJobVssOptions [-Job]  [-Options]  -Credential  [-WarningAction ] [-WarningVariable ] []

The offline/inline Get-Help Set-VBRJobVssOptions -Full Syntax, shows that this cmdlet may use only two of the three parameters at the same time. If you want to use all three, you must run the cmdlet twice:

Set-VBRJobVssOptions [-Job]  [-Options]  [-WarningAction ] [-WarningVariable ] []

Set-VBRJobVssOptions [-Job] -Credentials [-WarningAction ] [-WarningVariable ] []

Also note that the online documentation misspells the parameter -Credentials, instead using the incorrect singular-tense -Credential.

Set-VBRJobSchedule -Periodicaly

Veeam has confirmed that the parameter -Periodicaly is misspelled in the PowerShell cmdlet, not in the online/inline documentation. The documentation is accurately misspelling the parameter -Periodicaly.

Set-VBRJobSchedule -Job  [-Periodicaly] [-FullPeriod ] [-PeriodicallyKind ])