Skip to content
Luca Dell'Oca Principal Cloud Architect @Veeam
Virtual To The Core Virtual To The Core

Virtualization blog, the italian way.

  • Media
  • About me
Virtual To The Core
Virtual To The Core

Virtualization blog, the italian way.

Cloud Connect automatic usage reporting

Luca Dell'Oca, February 12, 2019February 11, 2019

Veeam Cloud Connect allows service providers to charge their costumers on the base of multiple parameters, but together with used space license consumption is surely one of the most common. This script allows service providers to configure an automatic usage reporting.

Manual report

In the user interface, the way to check the usage of Veeam Cloud Connect is via the console: by opening the main menu and selecting License, the operator can reach this info box:

By hitting the button Report… an additional box appears:

From here, providers can print or save the report as a pdf or as a json file (for further processing).

But, obviously, it’s way better to automate the entire process, and that’s what this script does.

 

The script

$vbrserver = "vbr.domain.local"
$vbruser = "Administrator"
$vbrpwd = "password"

asnp "VeeamPSSnapIn" -ErrorAction SilentlyContinue

Connect-VBRServer -Server $vbrserver -User $vbruser -Password $vbrpwd

$csvFileName = "vcc_report.csv"
$tenantlist = Get-VBRCloudTenant
$results = @()

foreach ($tenant in $tenantlist) {
        $details = [ordered]@{           
                Tenant           = $tenant
                VM_Backup        = $Tenant.VMCount
                VM_Replica       = $tenant.ReplicaCount
                Wks_Backup       = $tenant.WorkstationCount
                Srv_Backup       = $tenant.ServerCount
        }                          
        $results += New-Object PSObject -Property $details
    }

$results | export-csv -Path $csvFileName -NoTypeInformation

Disconnect-VBRServer

 

The script connects to the Cloud Connect server, retrieves the list of the tenants, and for each of them reads the amount of the consumed licenses for each type of protected resources: Backup VM, Replica VM, workstations and Servers. Then, puts all those data into a CSV file that is formatted like this:

"Tenant","VM_Backup","VM_Replica","Wks_Backup","Srv_Backup"
"Tenant3","1","0","0","0"
"Tenant1","3","0","0","0"
"Tenant2","1","0","0","0"

You can then parese the CSV file with any exernal tool, from simple Microsoft Excel to different chargeback/billing systems.

NOTE: if you want to obtain the same information via API, please note there’s a hotfix to be applied to the Veeam Enterprise Manager server on top of 9.5 Update 4. Please ask Veeam support for the bits and be sure that the starting point is an installation with version 9.5.4.2615.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
Tech automationcloud connectpowershellreportingusageveeam

Post navigation

Previous post
Next post

Search

Sponsors

Latest Posts

  • Migrate WSL (Windows Subsystem for Linux) to a new computer
  • Pass keystrokes to a pfSense virtual machine to install it automatically
  • Automatically deploy pfSense with Terraform and Ansible
  • My Automated Lab project: #6 Create a S3 Bucket with Terraform
  • My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
©2025 Virtual To The Core | WordPress Theme by SuperbThemes
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy