VMs in Job Script Help

PowerShell script exchange

VMs in Job Script Help

Veeam Logoby BHB3805 » Tue Nov 26, 2013 5:16 pm

I am having difficulty in creating a script to list each backup job and the respective VMs in each job.
I know this should be a no-brainer, but I'm struggling.
Any suggestions or script samples?
Posts: 25
Liked: 1 time
Joined: Fri Nov 04, 2011 1:45 pm
Full Name: Dan Andryszak

Re: VMs in Job Script Help

Veeam Logoby v.Eremin » Wed Nov 27, 2013 8:03 am

Hi, Dan, the following script seems to do everything you're after:

Code: Select all
asnp VeeamPSSnapin
Get-VBRJob | ? {$_.jobtype -eq "Backup"} | Select-Object -Property @{N="Job Name";E={$_.name}}, @{N="VMs";E={$_.GetViOijs().name}} | Format-Table

Veeam Software
Posts: 14812
Liked: 1112 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Return to PowerShell

Who is online

Users browsing this forum: No registered users and 10 guests