PowerShell script exchange
Post Reply
marius roma
Veteran
Posts: 459
Liked: 5 times
Joined: Feb 01, 2012 12:04 pm
Full Name: Mario
Contact:

List all VMs for a given job

Post by marius roma »

I need to list all the VM processed by a given job that is confngured to process either VMs and folders.
Folders can contain subfolders and VMs in subfolders should be listed as well.
How can I get a list of *ALL* the VMs currently processed by a given job?
Regards
marius
DGrinev
Veteran
Posts: 1943
Liked: 247 times
Joined: Dec 01, 2016 3:49 pm
Full Name: Dmitry Grinev
Location: St.Petersburg
Contact:

Re: List all VMs for a given job

Post by DGrinev »

Hi Marius,

Did you see the cmdlet Get-VBRJobObject, it should provide the list of VMs in the particular job. Thanks!
tdewin
Veeam Software
Posts: 1775
Liked: 646 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: List all VMs for a given job

Post by tdewin » 1 person likes this post

If you need the actuall processed VMs, you can look at the latest backup session :

Code: Select all

$js = Get-VBRJob -name "My job"
$s = $j.FindLastSession()
$ts = $s.GetTaskSessions()
$ts now contains a tasksession for every vm
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests