Cloud Connect Tenant

PowerShell script exchange

Cloud Connect Tenant

Veeam Logoby jsdumont » Wed Feb 08, 2017 9:38 pm

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.
jsdumont
Novice
 
Posts: 6
Liked: never
Joined: Wed Feb 08, 2017 9:27 pm
Full Name: Jean-Sébastien Dumont

Re: Cloud Connect Tenant

Veeam Logoby dellock6 » Sat Feb 11, 2017 1:50 pm

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
EMEA Cloud Architect @ Veeam Software

@dellock6
http://www.virtualtothecore.com
vExpert 2011-2012-2013-2014-2015-2016
Veeam VMCE #1
dellock6
Veeam Software
 
Posts: 5136
Liked: 1377 times
Joined: Sun Jul 26, 2009 3:39 pm
Location: Varese, Italy
Full Name: Luca Dell'Oca

Re: Cloud Connect Tenant

Veeam Logoby v.Eremin » Mon Feb 13, 2017 5:33 pm

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.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Cloud Connect Tenant

Veeam Logoby jsdumont » Wed Feb 15, 2017 1:17 pm

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!
jsdumont
Novice
 
Posts: 6
Liked: never
Joined: Wed Feb 08, 2017 9:27 pm
Full Name: Jean-Sébastien Dumont

Re: Cloud Connect Tenant

Veeam Logoby v.Eremin » Sat Feb 18, 2017 11:05 am

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.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 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 2 guests