Hi,
I would like to seek advise how to backup VMs under vApp or what command should I use to call all the VMs under vApp and get the script create a backup job automatically. I'm able to add the vApp using Gui, but i need to automate the creation of backup job using script.
Thank you.
-
- Novice
- Posts: 7
- Liked: never
- Joined: Nov 07, 2013 3:47 am
- Full Name: Emil Juanillo
- Contact:
-
- Novice
- Posts: 7
- Liked: never
- Joined: Nov 07, 2013 3:47 am
- Full Name: Emil Juanillo
- Contact:
Re: Powershell script to backup VMs under vApp
Hi to All,
Just to make it simple, is there a way to get the VMs name under VirtualApplication group in a Folder?
Currently i'm using this script but not showing VMs under VApp.
Find-VBRObject -Server $VBRserverVC | ?{$_.VMFolder -eq "group-vxxx"} | Select Name
Thank you.
Just to make it simple, is there a way to get the VMs name under VirtualApplication group in a Folder?
Currently i'm using this script but not showing VMs under VApp.
Find-VBRObject -Server $VBRserverVC | ?{$_.VMFolder -eq "group-vxxx"} | Select Name
Thank you.
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Powershell script to backup VMs under vApp
As it says when you run it, Find-VBRObject is obsolete and has been for some time. Instead you should be using Find-VBRViEntity which is capable of finding vCenter objects including vApps which you can then add to the job with Add-VBRViJobObject something like this:
If however, you'd rather just add the VMs from the vApp to the job as individual VMs you could do something like:
Code: Select all
Find-VBRViEntity -Name "<vApp_Name>" | Add-VBRViJobObject -Job "<Job_Name>"
Code: Select all
$vapp = Find-VBRViEntity -Name "<vApp_Name>"
Find-VBRViEntity | ?{$_.Path -like ($vapp.Path + "\*")} | Add-VBRViJobObject -Job "<Job_Name>"
-
- Novice
- Posts: 7
- Liked: never
- Joined: Nov 07, 2013 3:47 am
- Full Name: Emil Juanillo
- Contact:
Re: Powershell script to backup VMs under vApp
Thanks Tom, I will try this one.
Who is online
Users browsing this forum: No registered users and 6 guests