PowerShell script exchange
Post Reply
rsarnold1s
Influencer
Posts: 11
Liked: never
Joined: May 05, 2016 10:33 pm
Contact:

Get Job name from VM

Post by rsarnold1s »

Hello-

Wondering if it is possible to provide a VM name and list all the jobs that contain that VM? My goal here is to create a server decommission script that would remove a VM from any jobs it is currently a member of.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get Job name from VM

Post by veremin »

Is this VM added as individual VM or through container (folder, resource pool, etc.) to backup jobs? Thanks.
rsarnold1s
Influencer
Posts: 11
Liked: never
Joined: May 05, 2016 10:33 pm
Contact:

Re: Get Job name from VM

Post by rsarnold1s »

It is added as an individual VM.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get Job name from VM

Post by veremin »

Then, try the following script:

Code: Select all

asnp VeeamPSSnapin
Get-VBRJob | where {$_.GetObjectsInJob().name -eq "Name of your VM"} | select name
Thanks.
rsarnold1s
Influencer
Posts: 11
Liked: never
Joined: May 05, 2016 10:33 pm
Contact:

Re: Get Job name from VM

Post by rsarnold1s »

Perfect, thank you!
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 8 guests