PowerShell script exchange
Post Reply
jsdumont
Novice
Posts: 6
Liked: never
Joined: Feb 08, 2017 9:27 pm
Full Name: Jean-Sébastien Dumont
Contact:

Cloud Connect Tenant

Post by jsdumont »

Hi,

I want to know if we can schedule the report fo Cloud Connect Tenants. The output from the report button in the GUI is really nice but I can find a way to schedule it. I've looked in Veeam One Reporter but it's not the exact same info as the report button from the GUI. I also checked to build a custom report from Powershell but it seems I don't have access to all the informations I need (like # of VM by repo by tenant).

Code: Select all

"Get-VBRCloudTenant" return the # of VM that tenant have, but I can't find the info per repo.
"Get-VBRCloudTenant | Select-Object -ExpandProperty Resources" returns a bit more infos but again I don't know the # of VM or the last results for that repo.
I also tried the following command but it returns me errors

Code: Select all

Get-VBRBackupRepository -Name "SomeRepoName" | Get-VBRCloudTenant
Get-VBRCloudTenant : Sequence contains more than one matching element
At line:1 char:55
+ Get-VBRBackupRepository -Name "SomeRepoName" | Get-VBRCloudTenant
+                                                       ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VBRCloudTenant], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,Veeam.Backup.PowerShell.Cmdlets.GetVBRCloudTenant
So if I could only schedule the same report as from the GUI, it would be nice.
dellock6
VeeaMVP
Posts: 6166
Liked: 1971 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Cloud Connect Tenant

Post by dellock6 »

One of our service provider (and Veeam Vanguard) Arne Fokkema created this relly nice script, see if it can help you:
https://ict-freak.nl/2017/01/11/powersh ... es-report/

Luca
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
veremin
Product Manager
Posts: 20413
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Cloud Connect Tenant

Post by veremin »

Just an example how backup and replica counts can be returned via PowerShell. VM count refers to backup VM count:

Code: Select all

Asnp VeeamPSSnapin
Get-VBRCloudTenant | select name, VMCount, ReplicaCount 
Thanks.
jsdumont
Novice
Posts: 6
Liked: never
Joined: Feb 08, 2017 9:27 pm
Full Name: Jean-Sébastien Dumont
Contact:

Re: Cloud Connect Tenant

Post by jsdumont »

Hi!

Thanks for the replies. My problem is when a tenant have more than one repository, I'm not able to get the VM count per repository. But that's fine for now, I can live with that.

The help file of the Get-VBRCloudTenant command return this :

Code: Select all

--------------  Example 3 --------------

C:\PS>Get-VBRBackupRepository -Name "Backups Vol2" | Get-VBRCloudTenant


This command looks for the cloud tenants by backup repository.
Run Get-VBRBackupRepository to get the repository and pipe the result to Get-VBRCloudTenant.
However, when I run that command, I got the following error :

Code: Select all

[color=#FF0000]Get-VBRCloudTenant : Sequence contains more than one matching element
At line:1 char:56
+ Get-VBRBackupRepository -Name "Hidden Repository Name" | Get-VBRCloudTenant
+                                                        ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VBRCloudTenant], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,Veeam.Backup.PowerShell.Cmdlets.GetVBRCloudTenant[/color]
So I'm wondering if it's a bugg in the piping of that command.

Thanks!
veremin
Product Manager
Posts: 20413
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Cloud Connect Tenant

Post by veremin »

What happens if you try to get this information differently?

Rough example as I don't have a console at hand:

Code: Select all

Get-VBRCloudTenant | where {$_.Resources.Repository.Name -eq "Backups Vol2"}
Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests