-
- Service Provider
- Posts: 880
- Liked: 163 times
- Joined: Aug 26, 2013 7:46 am
- Full Name: Bastiaan van Haastrecht
- Location: The Netherlands
- Contact:
License information
Hello,
I would like to fetch the license information from the Enterprise Portal thru Powershell or the RestAPI. But I'm unable to find an CMDlet or schema providing this information. Is that correct?
I'm primairly interested in the support expiry date. What are my options to get it thru scripting?
Kind Regards,
Bastiaan
I would like to fetch the license information from the Enterprise Portal thru Powershell or the RestAPI. But I'm unable to find an CMDlet or schema providing this information. Is that correct?
I'm primairly interested in the support expiry date. What are my options to get it thru scripting?
Kind Regards,
Bastiaan
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
Veeam ProPartner, Service Provider and a proud Veeam Legend
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
As far as I know, information regarding license is not present in PowerShell, neither is it in RESTful API. The only way I can think of is to query db directly. Thanks.
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: License information
Hi,
Please try this:
Kudos to this guy
Please try this:
Code: Select all
$regBinary = (Get-Item 'HKLM:\SOFTWARE\VeeaM\Veeam Backup and Replication\license').GetValue('Lic1')
$veeamLicInfo = [string]::Join($null, ($regBinary | % { [char][int]$_; }))
-
- Service Provider
- Posts: 880
- Liked: 163 times
- Joined: Aug 26, 2013 7:46 am
- Full Name: Bastiaan van Haastrecht
- Location: The Netherlands
- Contact:
Re: License information
Getting it thru the registry works, thanks! (had to adjuist the verison checking, but it works)
Would prefer something Veeam supported like RestAPI or PowerShell CMDlet, so I do not have to worry about this custom script to get incompliant with upcoming Veeam version upgrade.
So a feature request to fetch license information thru RestAPI or PowerShell please.
Would prefer something Veeam supported like RestAPI or PowerShell CMDlet, so I do not have to worry about this custom script to get incompliant with upcoming Veeam version upgrade.
So a feature request to fetch license information thru RestAPI or PowerShell please.
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
Veeam ProPartner, Service Provider and a proud Veeam Legend
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
Your voice about availability of license information in our automation services has been heard. Thanks for the feedback; appreciated.
-
- Service Provider
- Posts: 8
- Liked: never
- Joined: Nov 24, 2015 3:10 pm
- Full Name: Thomas Adams
- Contact:
[MERGED]:Get Cloud Connect Backup/Replica Usage Programmatic
Hello,
Under the License Information window in the Veeam Gui, does anyone know how to obtain these two values?
Cloud Connect (Backup)
Cloud Connect (Replica)
I could do with accessing the information via powershell, c# or the rest api as we are importing the information into another application. Just to clarify, i'm not looking for the information stored in the license, i'm looking to obtain the "Used" amount.
Any help is appreciated. Cheers
Under the License Information window in the Veeam Gui, does anyone know how to obtain these two values?
Cloud Connect (Backup)
Cloud Connect (Replica)
I could do with accessing the information via powershell, c# or the rest api as we are importing the information into another application. Just to clarify, i'm not looking for the information stored in the license, i'm looking to obtain the "Used" amount.
Any help is appreciated. Cheers
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
General information:
Information per tenant:
Thanks.
Code: Select all
$BackupCount = 0
$ReplicaCount = 0
foreach ($Tenant in Get-VBRCloudTenant)
{
$BackupCount = $BackupCount + $Tenant.VMCount
$ReplicaCount = $ReplicaCount + $Tenant.ReplicaCount
}
$BackupCount, $ReplicaCount
Code: Select all
Get-VBRCloudTenant | select -Property @{N="Tenant";E={$_.name}}, @{N="Backup Count";E={$_.VMCount}}, @{N="Replica Count";E={$_.ReplicaCount}} | ft
-
- Service Provider
- Posts: 8
- Liked: never
- Joined: Nov 24, 2015 3:10 pm
- Full Name: Thomas Adams
- Contact:
Re: License information
Thanks Vladimir,
I had to update the script you provided slightly as we have some cloud tenants that are disabled or they have an expiration date which has now expired.
Here is the updated script just in case someone needs the same information
Before it was slightly off with the values but now it seems to be reporting correctly. Many Thanks!
I had to update the script you provided slightly as we have some cloud tenants that are disabled or they have an expiration date which has now expired.
Here is the updated script just in case someone needs the same information
Code: Select all
$BackupCount = 0
$ReplicaCount = 0
Get-VBRCloudTenant | Where-Object {($_.Enabled -eq $TRUE) -and (($_.LeaseExpirationEnabled -eq $FALSE) -or (($_.LeaseExpirationEnabled -eq $TRUE) -and ($_.LeaseExpirationDate -gt (Get-Date))))} | ForEach-Object {
$BackupCount = $BackupCount + $_.VMCount
$ReplicaCount = $ReplicaCount + $_.ReplicaCount
}
$BackupCount, $ReplicaCount
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
Glad to hear my input was helpful. The updated script looks good, thanks for sharing!
-
- Service Provider
- Posts: 40
- Liked: 1 time
- Joined: May 13, 2013 2:32 am
- Location: Brisbane
- Contact:
[MERGED]: Reporting on license count
Hi All,
We are trying to report on our license count, can either do this from powershell or sql to inject it into our monitoring server and get backup license trending.
what we've found recently is that our licensing in veeam is far in excess of what we see from our SQL query and what we expect in the environment. (Over 100 protected VMs higher)
Anyone aware of an SQL query that can be run against the veeam database to return this number
We are trying to report on our license count, can either do this from powershell or sql to inject it into our monitoring server and get backup license trending.
what we've found recently is that our licensing in veeam is far in excess of what we see from our SQL query and what we expect in the environment. (Over 100 protected VMs higher)
Anyone aware of an SQL query that can be run against the veeam database to return this number
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: License information
Hi Onthax,
Please review the thread and feel free to ask additional questions if any arise.
Thank you.
Please review the thread and feel free to ask additional questions if any arise.
Thank you.
-
- Novice
- Posts: 3
- Liked: 1 time
- Joined: Jun 10, 2016 9:03 am
- Contact:
[MERGED] Veeam License Monitoring
Hi,
Is there a way to extract some infomation about the current license in use through powershell. I need informations like number of VMs assigned to our license and how much we got left.
Is there a way to extract some infomation about the current license in use through powershell. I need informations like number of VMs assigned to our license and how much we got left.
-
- Service Provider
- Posts: 326
- Liked: 78 times
- Joined: Mar 16, 2015 4:00 pm
- Full Name: David Rubin
- Contact:
Re: License information
I've reviewed the thread (and others) and I don't see an answer to this question. I want to generate a list (wither via SQL or PowerShell) of all the VMs that are currently licensed (in other words, the list that appears in the "Licensed VMs" dialog box).
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
What kind of license are you using? VCSP rental, VCSP Cloud Connect rental, etc.? Depending on the answer, we might propose a way to get the requested information even without scripting. Thanks.
-
- Service Provider
- Posts: 326
- Liked: 78 times
- Joined: Mar 16, 2015 4:00 pm
- Full Name: David Rubin
- Contact:
Re: License information
A combination of Rental and Cloud Connect.
-
- Service Provider
- Posts: 40
- Liked: 1 time
- Joined: May 13, 2013 2:32 am
- Location: Brisbane
- Contact:
Re: License information
+1 on the feature request for RESTAPI access to licensing information, particularly if you are multi tenant and need to sort them by customer.
-
- Service Provider
- Posts: 326
- Liked: 78 times
- Joined: Mar 16, 2015 4:00 pm
- Full Name: David Rubin
- Contact:
Re: License information
I had a great script that would query the database and could extract usage information by customer. Unfortunately, the "LicensedVMs" table went away with 9.5 U4 and Cloud Connect VMs now only count as a fraction of an instance, so I have to start from scratch. I also give a +1 for this feature, since it seems like even VeeamONE can't collate everything together into a single report.
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
We do plan to make this information available in PowerShell in one of the next product releases. Thanks!
-
- Expert
- Posts: 110
- Liked: 5 times
- Joined: Oct 21, 2015 10:01 am
- Full Name: John
- Contact:
[MERGED] Get remaining days left in a license via Powershell?
Hello
I want to get the remaining days left in a license on a local system via Powershell.
How can I do this?
I want to get the remaining days left in a license on a local system via Powershell.
How can I do this?
-
- Veteran
- Posts: 1943
- Liked: 247 times
- Joined: Dec 01, 2016 3:49 pm
- Full Name: Dmitry Grinev
- Location: St.Petersburg
- Contact:
Re: Get remaining days left in a license via Powershell?
Hi John,
In the current version of the product you cannot obtain the license information through the Powershell.
Your voice has been counted as a feature request, thank you!
In the current version of the product you cannot obtain the license information through the Powershell.
Your voice has been counted as a feature request, thank you!
-
- Expert
- Posts: 110
- Liked: 5 times
- Joined: Oct 21, 2015 10:01 am
- Full Name: John
- Contact:
Re: License information
What way do you recommend getting license information in a text output?
Even a SQL query would be fine.
Even a SQL query would be fine.
-
- Expert
- Posts: 110
- Liked: 5 times
- Joined: Oct 21, 2015 10:01 am
- Full Name: John
- Contact:
Re: License information
Nothing at all?
-
- Veteran
- Posts: 1943
- Liked: 247 times
- Joined: Dec 01, 2016 3:49 pm
- Full Name: Dmitry Grinev
- Location: St.Petersburg
- Contact:
Re: License information
Hi John,
Can you share the scenario for getting license information in text, maybe we can consider another approach in solving the objective? Thanks!
Can you share the scenario for getting license information in text, maybe we can consider another approach in solving the objective? Thanks!
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
You can license expiration date, using this script:
Then, you will need to convert $ExpirationDate to DateTime and subtract current date from it. The resulting value (output in days) will be number of days left till license expiration.
Thanks!
Code: Select all
$regBinary = (Get-Item 'HKLM:\SOFTWARE\VeeaM\Veeam Backup and Replication\license').GetValue('Lic1')
$veeamLicInfo = [string]::Join($null, ($regBinary | % { [char][int]$_; }))
$ExpirationDateFormat = "Expiration date\=\d{1,2}\/\d{1,2}\/\d{1,4}"
$ExpirationDate = [regex]::matches($VeeamLicInfo, $ExpirationDateFormat)[0].Value.Split("=")[1]
$ExpirationDate
Thanks!
-
- Expert
- Posts: 110
- Liked: 5 times
- Joined: Oct 21, 2015 10:01 am
- Full Name: John
- Contact:
Re: License information
Monitoring. Getting licence date/time and depending on that, launch a warning email alert and then a critical alert.
-
- Expert
- Posts: 110
- Liked: 5 times
- Joined: Oct 21, 2015 10:01 am
- Full Name: John
- Contact:
Re: License information
v.eremin wrote: ↑Apr 08, 2019 5:10 pm You can license expiration date, using this script:
Then, you will need to convert $ExpirationDate to DateTime and subtract current date from it. The resulting value (output in days) will be number of days left till license expiration.Code: Select all
$regBinary = (Get-Item 'HKLM:\SOFTWARE\VeeaM\Veeam Backup and Replication\license').GetValue('Lic1') $veeamLicInfo = [string]::Join($null, ($regBinary | % { [char][int]$_; })) $ExpirationDateFormat = "Expiration date\=\d{1,2}\/\d{1,2}\/\d{1,4}" $ExpirationDate = [regex]::matches($VeeamLicInfo, $ExpirationDateFormat)[0].Value.Split("=")[1] $ExpirationDate
Thanks!
I can work with this, thanks.
The output format though
Is it month/day or day/month?
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: License information
In my lab the output is provided in day/month format. Thanks!
Who is online
Users browsing this forum: No registered users and 16 guests