VeeamHub/powershell

Incompatibility with Veeam 9.5u4

Closed this issue · 4 comments

Hi There,

This script BR-LicenseUsage appears to not be compatible with Veeam 9.5u4, the following message is received when attempting to execute the script:

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.Common.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:23 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.Common.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.Model.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:24 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.Model.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.LicenseLib.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:25 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.LicenseLib.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find
path 'C:\Windows\system32.CorePath\Veeam.Backup.DBManager.dll' because it does not exist."
At C:\Temp\VeeamAudit.ps1:26 char:18

  • Add-Type -Path "$regsettings.CorePath\Veeam.Backup.DBManager.dll"
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
    • FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand

Unable to find type [Veeam.Backup.LicenseLib.CLicense].
At C:\Temp\VeeamAudit.ps1:418 char:8

  • $lic = [Veeam.Backup.LicenseLib.CLicense]::LoadLicFromRegistry()
  •    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.LicenseLib.CLicense:TypeName) [], R
      untimeException
    • FullyQualifiedErrorId : TypeNotFound

WARNING: [RentalVMUsage] Unable to get statistics. Ensure you use the latest version of Veeam Backu
p & Replication.
Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:334 char:139

  • ... form]::EEndPoint,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Workst ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:335 char:139

  • ... form]::EEndPoint,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Server ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:336 char:144

  • ... ::ELinuxPhysical,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Workst ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Unable to find type [Veeam.Backup.Model.Endpoint.EEpLicenseMode].
At C:\Temp\VeeamAudit.ps1:337 char:144

  • ... ::ELinuxPhysical,[Veeam.Backup.Model.Endpoint.EEpLicenseMode]::Server ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Veeam.Backup.Mo....EEpLicenseMode:TypeName) [],
      RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Thanks, Tyler

It looks like the Veeam DLL is missing from the specific folder hence why it fails. We'll try to create a fix for it.

It’s not just the DLL, it’s changes to the underlying classes and some things now only being interfaces rather than public classes, due to the switch to instance licenses. WMI queries are the primary method to report now, to avoid querying the database directly. I’ll try and push an updated script next week after vacation.

Any Update on this?

New scripts to provide license details for instance licensing in version 9.5U4 and higher have been added to the PowerShell repository. They can be found in the 'BR-InstanceLicenseUsage' folder.