It is now easier than ever to manage billing for all your 3rd party suppliers using our generic CSV import tool. Although most suppliers can offer you a CSV file out of the box, some might need a little extra help.
In this article, we'll show you how to get useful information out of Veeam Backup & Replication console. In this example, we're selling virtual machine backups and billing our customers based on the reserved storage quota (1) and the number of processed VMs (2), as reported by our Veeam Admin console.
We'll use a short PowerShell script to connect to our Veeam Backup & Replication admin console and export the data out of it.
Before you get started
Make sure you can install and run the PowerShell script in a user context that has direct network access to your Veeam Backup & Replication admin console.
Veeam only offers a PowerShell Snap-In at the time of writing. To use it you need to run Windows PowerShell 5.1, which is still the default version on Windows 10 and Windows Server 2019.
PowerShell Core 6 and up no longer support Snap-Ins. You can check your PowerShell version with the following command:
Get-Host | Select-Object Version
Install and run the script
(the script isn’t supported anymore) You can use the script as a reference.
Download our PowerShell script and save it on your server. Open up PowerShell and browse to the directory where you stored it, for example:
cd "c:\scripts\goolash"
Run Get-Help to verify the script and see how it works:
Get-Help ./veeam-to-csv.ps1 -Detailed
Now we're ready to export our CSV file with only a single command:
./veeam-to-csv.ps1
This assumes that the Veeam console is running on the same machine and that the user has the required privileges to connect to it. If you need to specify a different server or user credentials, you can pass these using the script's arguments.
./veeam-to-csv.ps1 -Server 192.168.0.15 -User foo -Password bar
Refer to the output of the Get-Help command above to read about all the available parameters.
The script will show you the collected data and store a CSV file in your home directory by default. The last line of the output will contain the full path to the CSV file.
You can also choose a different target directory using the -OutputDirectory parameter:
./veeam-to-csv.ps1 -OutputDirectory "c:\scripts\goolash\output\"
Import your data in Zomentum Connect.
Now you have all you need to start syncing with your Autotask contracts. Grab your newly minted CSV file and head over to the Connect application.
Go to the Import tool, create a new Vendor called "Veeam Backup & Replication" and select your CSV file.
In the next step, we'll have to map each column from the CSV file to the right field:
User ID maps to Customer ID
User Name maps to Customer Name
Units maps to License Count
Product maps to both Product Name and Product SKU
Press the "Preview import" button to verify the data. If you're happy with the results, press the "Import Data" button.
You'll be redirected to your imported data: