-
- Service Provider
- Posts: 2
- Liked: never
- Joined: Oct 30, 2015 9:56 am
- Contact:
PowerShell number of Protected VMs
Hello.
I wondered if there is a way to gather the number of VMs you currently have protected as in this screenshot below:
Thanks in advance!
Best regards
Anders Hagen Hansen
I wondered if there is a way to gather the number of VMs you currently have protected as in this screenshot below:
Thanks in advance!
Best regards
Anders Hagen Hansen
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: PowerShell number of Protected VMs
Hi,
In your case (Cloud) VMs that have at least one restore point are considered to be protected, no matter how old that restore is. Hence all you need to do is get total list of retore points, select by VM names, get unique and count lines. Pleas try the following code and check if the number matches:
Btw, have you considered using Veeam ONE reports to get the statistics about your environment?
Thank you.
In your case (Cloud) VMs that have at least one restore point are considered to be protected, no matter how old that restore is. Hence all you need to do is get total list of retore points, select by VM names, get unique and count lines. Pleas try the following code and check if the number matches:
Code: Select all
(Get-VBRRestorePoint | select {$_.VmName} -uniq).Count
Thank you.
-
- Product Manager
- Posts: 20413
- Liked: 2301 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: PowerShell number of Protected VMs
Since we're talking here about Service Provider's site, I don't think that tenants restore points are reflected there, thus, Get-VBRRestorePoint would return either local restore points created by SP himself or nothing.
In order to achieve your goal, you should query CloudTenant entity or, more specifically, VMCount property:
Thanks.
In order to achieve your goal, you should query CloudTenant entity or, more specifically, VMCount property:
Code: Select all
(Get-VBRCloudTenant).VMCount
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Oct 14, 2014 2:29 pm
- Full Name: Leslie B
Managed VMs Count
Anyone know how to get the "Managed VMs" count through PowerShelll?
I tried the below command from a previous post. But the counts are coming back different.
I tried the below command from a previous post. But the counts are coming back different.
Code: Select all
(Get-VBRRestorePoint | select {$_.VmName} -uniq).Count
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Managed VMs Count
Hi,
May I ask you what were the numbers it returned/you expected?
Thanks
May I ask you what were the numbers it returned/you expected?
Thanks
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Oct 14, 2014 2:29 pm
- Full Name: Leslie B
Re: Managed VMs Count
Here's what I'm looking for...
With this command I'm getting 609.
I added a filter for IsLicensed and I'm getting 562 with this command.
With this command I'm getting 609.
Code: Select all
(Get-VBRRestorePoint | select {$_.VmName} -uniq).Count
Code: Select all
(Get-VBRRestorePoint | Where {$_.IsLicensed -eq $true} | select {$_.Name} -uniq).Count
-
- Product Manager
- Posts: 20413
- Liked: 2301 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: PowerShell number of Protected VMs
Aren't there any imported restore points among those listed? You can double check it, using the following one-liner:
Thanks.
Code: Select all
(Get-VBRRestorePoint | ?{($_.FindBackup().name) -notlike "*_imported*"}).count
Who is online
Users browsing this forum: No registered users and 25 guests