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 » Jul 12, 2018 6:10 am

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,

v.Eremin
Veeam Software
Posts: 15234
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell script failes for the vcenter server

Post by v.Eremin » Jul 12, 2018 11:41 am

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 » Jul 12, 2018 1:44 pm

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.

v.Eremin
Veeam Software
Posts: 15234
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell script failes for the vcenter server

Post by v.Eremin » Jul 12, 2018 1:54 pm

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 » Jul 12, 2018 2:03 pm

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 » Jul 12, 2018 2:13 pm

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 :)

v.Eremin
Veeam Software
Posts: 15234
Liked: 1146 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Powershell script failes for the vcenter server

Post by v.Eremin » Jul 12, 2018 2:44 pm

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: Exabot [Bot] and 8 guests