PowerShell script exchange
Post Reply
gmitchum
Novice
Posts: 3
Liked: never
Joined: Apr 03, 2017 6:30 pm
Contact:

Looking for PowerShell commands - List all VMs

Post by gmitchum » Apr 03, 2017 9:16 pm

Looking for PowerShell commands - List all VMs...The key is to "Exclude the Exclusions".

I have about 300+ VMs & Templates excluded. I run a powershell report and it lists all the VMs that have been backed up (they meet the 24 hour parameter).
The issue is that the 300 that shouldn't get backed up show as missed. This list is sufficiently dynamic that a manually maintained list is unwieldy.
I thought that maybe if I defined a job as "Capture the VMs in "Discovered Virtual Machine" directory", (a dir was created for the excluded VMs and templates at the "VMs & Template" level) and it would only look there for the VMs of interest. Didn't seem to make a difference. The job ran fine, grabbing only the VMs in the specified directory, ignored the VMs & Templates in the "do not backup" directory and no exclusions listed in the job. Was GREAT.

Is there something I can do at the vCenter level to clean it up?

Suggestions?

nielsengelen
Veeam Software
Posts: 2634
Liked: 540 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Looking for PowerShell commands - List all VMs

Post by nielsengelen » Apr 04, 2017 7:05 am

So you have a backup job and you need to know how to show the exclusions from that job via PowerShell?
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

veremin
Product Manager
Posts: 16879
Liked: 1430 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Looking for PowerShell commands - List all VMs

Post by veremin » Apr 04, 2017 12:03 pm

What you can do is to

- Create two lists - VMs that were not processed within the last 24 hours (you already have this scripted) and VMs that were excluded from processing (this script)
- Compare them to find the same names
- Remove VMs that exist in two lists (delta)

Thanks.

Post Reply

Who is online

Users browsing this forum: SHL and 3 guests