-
- Novice
- Posts: 6
- Liked: never
- Joined: Sep 29, 2017 1:19 pm
- Contact:
Find-VBRViEntity and machine with duplicate names
Hello,
Veeam 9.0 + Vcenter 6.0
I've got in two virtual machines in two different folders .
I must backup only the backup under a specific folder.
The two machines hav the same name but different Ids and path.
How can i filter the VM using Find-VBRViEntity , and obtain only the VMs under a specific folder?
thank you
Veeam 9.0 + Vcenter 6.0
I've got in two virtual machines in two different folders .
I must backup only the backup under a specific folder.
The two machines hav the same name but different Ids and path.
How can i filter the VM using Find-VBRViEntity , and obtain only the VMs under a specific folder?
thank you
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
Have you tried to use VmFolderName or Path parameter of ViEntity object? Thanks.
-
- Novice
- Posts: 6
- Liked: never
- Joined: Sep 29, 2017 1:19 pm
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
I will try
thank you!
thank you!
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
Let me know how things are going. Should need be, we will find a different way to approach this problem. Thanks.
-
- Novice
- Posts: 6
- Liked: never
- Joined: Sep 29, 2017 1:19 pm
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
I've tried with both, but both give me a
NamedParameterNotFound
error
NamedParameterNotFound
error
Code: Select all
PS C:\Users\Administrator> Add-PSSnapin VeeamPSSnapin
$VMName = "myVM"
$Folder = "esx1.domain.local\FOLDER\SUBFOLDER"
#Connect-VBRServer
$VM = Find-VBRViEntity -Name $VMName -VMsAndTemplates -Path "$Folder\$VMName"
write-host $VM
Find-VBRViEntity : A parameter cannot be found that matches parameter name 'Path'.
At line:5 char:57
+ $VM = Find-VBRViEntity -Name $VMName -VMsAndTemplates -Path "$Folder\$VMName"
+ ~~~~~
+ CategoryInfo : InvalidArgument: (:) [Find-VBRViEntity], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Veeam.Backup.PowerShell.Command.FindVBRViEntity
PS C:\Users\Administrator> Add-PSSnapin VeeamPSSnapin
$VMName = "myVM"
$Folder = "esx1.domain.local\FOLDER\SUBFOLDER"
#Connect-VBRServer
$VM = Find-VBRViEntity -Name $VMName -VMsAndTemplates -VMFolderName "$Folder\$VMName"
write-host $VM
Find-VBRViEntity : A parameter cannot be found that matches parameter name 'VMFolderName'.
At line:5 char:57
+ $VM = Find-VBRViEntity -Name $VMName -VMsAndTemplates -VMFolderName "$Folder\$ ...
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Find-VBRViEntity], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Veeam.Backup.PowerShell.Command.FindVBRViEntity
-
- Novice
- Posts: 6
- Liked: never
- Joined: Sep 29, 2017 1:19 pm
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
discard my previous post.
tried using
which returns nothing.
Dumping the vm list with
returns a "Path" field which does not report the path of the vm , but just
"esxi1.domain.local\vmname"
tried using
Code: Select all
$myVM = $VM | where {$_.Path -like "*$Folder\$VMName*" }
Dumping the vm list with
Code: Select all
$VM = Find-VBRViEntity -Name $VMName -VMsAndTemplates
$VM | ConvertTo-Csv | Out-File "allvm.csv"
"esxi1.domain.local\vmname"
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
Reading between the lines it seems that this host may be added to Veeam directly, rather than via vCenter, because otherwise the path should definitely be "<vcenter_host>\<folder>\<folder>\<vmname>" but, if the ESXi hosts are added directly then there's no folder hierarchy because that's all kept in vCenter.
-
- Novice
- Posts: 6
- Liked: never
- Joined: Sep 29, 2017 1:19 pm
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
I've added the vcenter into the veeam interface .
now i can correctly see the vcenter\folder structure , but I can't see the single vm , only resource groups
now i can correctly see the vcenter\folder structure , but I can't see the single vm , only resource groups
Code: Select all
"d75ef525-0104-4118-a60f-1177367749cb_resgroup-v212","207032","vcenter.local\folder1\folder2\207032"
-
- Novice
- Posts: 6
- Liked: never
- Joined: Sep 29, 2017 1:19 pm
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
digged deeper into the issue.
it was just the vcenter which gave me error , returning 2 objects.
adding the Type -eq Vm filter fixed the filtering issue
it was just the vcenter which gave me error , returning 2 objects.
adding the Type -eq Vm filter fixed the filtering issue
Code: Select all
$VM = Find-VBRViEntity -Name $VMName -VMsAndTemplates | where {$_.Type -eq "Vm"}
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Find-VBRViEntity and machine with duplicate names
Good to know that you've finally fixed the issue. Thanks for coming back and updating the topic with the found resolution; much appreciate.
Who is online
Users browsing this forum: No registered users and 7 guests