PowerShell script exchange
Post Reply
sorin.andruseac
Novice
Posts: 4
Liked: never
Joined: Jul 12, 2018 6:05 am
Full Name: Sorin
Contact:

Powershell script failes for the vcenter server

Post by sorin.andruseac »

Hi all,

I'm using Veeam Backup and Replication 9.5 free and the standard powershell script.
However in the list of the VMs I also have the vcenter server. It backups ok all the VMs with the exception of the vcenter server. It fails with the error:

Code: Select all

Start-VBRZip : Veeam Backup Free Edition does not support of multiple VMs backup. Specify a single VM, or install a paid product license.
Has anyone else experienced this?

Thanks,
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell script failes for the vcenter server

Post by veremin »

With free edition you cannot backup multiple VMs within one VeeamZIP task. You have to backup them one by one. Thanks.
sorin.andruseac
Novice
Posts: 4
Liked: never
Joined: Jul 12, 2018 6:05 am
Full Name: Sorin
Contact:

Re: Powershell script failes for the vcenter server

Post by sorin.andruseac »

well ... the script backups all vms one by one successfully. However in the list of the VMs is also the vcenter server. Only for this VM the backup fails wih the error above.
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell script failes for the vcenter server

Post by veremin »

Chances are, the script assumes it's a container of VMs and therefore fails. Thanks.
sorin.andruseac
Novice
Posts: 4
Liked: never
Joined: Jul 12, 2018 6:05 am
Full Name: Sorin
Contact:

Re: Powershell script failes for the vcenter server

Post by sorin.andruseac »

The script has a list a VMs:

$VMNames = "VM1","VM2","VcenterServer","VM3"
foreach ($VMName in $VMNames)
{
Start-VBRZip -Entity $VM
}

I removed irrelevant parts of the script.
It backups ok all the VMs, only for the Vcenter server fails with the error above.

Thanks in advance for any help.
sorin.andruseac
Novice
Posts: 4
Liked: never
Joined: Jul 12, 2018 6:05 am
Full Name: Sorin
Contact:

Re: Powershell script failes for the vcenter server

Post by sorin.andruseac »

On the second thought you are right indeed.

Code: Select all

Find-VBRViEntity -Name $VMName -Server $Server 
returns two "entities" one of type VM and one of type VC. As a quick fix I added a filter and rewrite the above line like this:

Code: Select all

Find-VBRViEntity -Name $VMName -Server $Server |?{$_.type -eq 'vm'}
Thanks for your help, this can be closed :)
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell script failes for the vcenter server

Post by veremin »

That's exactly what I suspected. Glad you've found a way to solve the issue.

Should other help be needed, don't hesitate to let us know.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests