PowerShell script exchange
Post Reply
swara
Lurker
Posts: 1
Liked: never
Joined: Apr 18, 2024 12:33 pm
Full Name: Swarupa P
Contact:

Add-VBRViJobObject not working

Post by swara »

Hello,

I am getting error as below when trying to add backup through powershell script

Add-VBRViJobObject: Cannot bind parameter Entities. can not convert the "Name of VDI" value of type system.string to type veeam.backup.core.infrastructure.IViTem
Mildur
Product Manager
Posts: 10099
Liked: 2693 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Add-VBRViJobObject not working

Post by Mildur »

Hi Swarupa

Please share the entire PowerShell script.
We cannot try to help with only the provided cmdlet command.

Best,
Fabian
Product Management Analyst @ Veeam Software
david.domask
Veeam Software
Posts: 2346
Liked: 555 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Add-VBRViJobObject not working

Post by david.domask »

Hi swara,

Fabian showed me your topic and as luck would have it, I can advise :)
add-VBRViJobObject: Cannot bind parameter Entities. can not convert the
"Name of VDI" value of type system.string to type veeam.backup.core.infrastructure.IViTem
Powershell is telling you what's wrong here. You passed a String ("Name of VDI") to the -Entities parameter on Add-VBRJobObject, which is expecting a type of IViTem.

https://helpcenter.veeam.com/docs/backu ... ml?ver=120

If we check the user guide, we see for -Entities parameter:
Entities

Specifies the array of VMware VMs you want to add to the job.

Accepts the IViItem[] object. To create this object, run the Find-VBRViEntity cmdlet.
So you need to:

1. Find the desired VM/Folder/Tag to add with Find-VBRViEntity and save it to a variable $entity
2. Save the desired Job to $job with Get-VBRJob
3. Then do

Code: Select all

Add-VBRViJobObject -Entities $entity -Job $job
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests