If you can't connect with the Connect-VBRServer cmdlet that is part of the veeam powershell module the issue is with the servers and not related with the AsBuiltReport code.
Check:
Firewall issues
try to connect with the Management Console and verify your license
Go to the services mmc console and check Veeam Services status
Veeam Backup & Replication version
12.1
Bug description
Connect-VBRServer : PowerShell environment initialization failed: Failed to load license from backup service. At line:1 char:2
Command-line input
New-AsBuiltReport -Report Veeam.VBR -Target serverip -Username .\administrator -Password *** -Format Html,Word -OutputFolderPath 'C:\Users\Administrator\Desktop\VeeamReports' -ReportConfigFilePath C:\Users\Administrator\Desktop\VeeamReports\AsBuiltReport.Veeam.VBR.json -Verbose
Steps to reproduce
I tried to connect with the below and get same results:
Connect-VBRServer -Server serverip -User ".\administrator" -Password "***"
Expected behaviour
VBR script to run and build a word document.
Screenshots
No response
Operating System
Server 2022 vanilla with Veeam VBR 12 installed Build 12.1.2.172
PowerShell Version
PS C:\Users\Administrator> $PSVersionTable
Name Value
PSVersion 5.1.20348.2652
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2652
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PowerShell Modules
Name Version
AsBuiltReport.Core 1.4.0
AsBuiltReport.Veeam.VBR 0.8.9
PScribo 0.10.0
Additional Context
There are 2 backup servers and both are doing exactly the same.
Before submitting