My personal laptop runs VAgent(Veeam Agent for Microsoft Windows 6.0.0.960 - Server Edition) My home server runs VBAR(12.0.0.1420) Both are community editions.
To Get the ID, I ran "Get-VBRComputerBackupJob -Mode ManagedByAgent"
My problem, this command fails, i cannot figure out why? C:\Program Files\Veeam\Endpoint Backup>Veeam.EndPoint.Manager.exe /backup "5c2b2cb9-7092-4a9e-8e4f-b08e0e18e168" Job with id "5c2b2cb9-7092-4a9e-8e4f-b08e0e18e168" was not found
The ID that you got was from VBR which is the Agent ID within the console and not the job ID from the local system. That is why the job is not running as you are trying to run it locally from the Agent install directory passing the ID from VBR so it will not recognize it. You should be able to run a similar command on the Agent system to get the job ID and run it that way or just run it from the VBR Console.
Thanks for the time, my ultimate goal is to run vagent from a simple .cmd script, where each command is ran in order. something like.
Run backup job and Wait for VAgent to finish
Run Restic
Do stuff
Send email
Live long and prosper
That is a good idea, to run the command(s), on my laptop. So, in a shell with admin privileges, i tried and failed. Note: My laptop IP address is 192.168.62.235
PS D:\data> Get-VBRComputerBackupJob -Mode ManagedByAgent Get-VBRComputerBackupJob : PowerShell client update environment initialization failed: Failed to connect to Veeam Backup & Replication server: No connection could be made because the target machine actively refused it 192.168.62.235:9392 Execution environment cannot be initialized to Remote At line:1 char:1 + Get-VBRComputerBackupJob -Mode ManagedByAgent + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) rGet-VBRComputerBackupJob], AggregateException + FullyQualifiedErrorId : UpdateCheckerErrorId,Veeam.Backup.PowerShell.Cmdlets.GetVBRComputerBackupJob
PS D:\data> Get-VBREPJob Get-VBREPJob : PowerShell client update environment initialization failed: Failed to connect to Veeam Backup & Replication server: No connection could be made because the target machine actively refused it 192.168.62.235:9392 Execution environment cannot be initialized to Remote At line:1 char:1 + Get-VBREPJob + ~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) Get-VBREPJob], AggregateException + FullyQualifiedErrorId : UpdateCheckerErrorId,Veeam.Backup.PowerShell.Cmdlets.GetVBREpJob
I am not sure if this will help on the Agent machine or not since it is managed by VBR so this is probably another command to use but see if this works at all - Get-VBREPJob - Veeam Backup PowerShell Reference
Also, there is a newer version of the Agent you might want to update yours. And check the patch level for VBR as there was one released with July 18th date.
Good suggestion, tho I believe i posted the output above.
newer version
OK
Thanks very much, Dave
Were you able to run the cmd against your VBR server previously? My assumption is you can successfully run the cmd on the VBR server itself? Typically, when you can’t run PoSH against a remote system, it is because Windows Remote Management service is not running. Is that running on your VBR server? If not, start it then try to execute the PoSH cmd on your laptop again.
Hello @coolsport00,
In the past, I had a single backup job on my laptop and so this worked just fine. "C:\Program Files\Veeam\Endpoint Backup\Veeam.EndPoint.Manager.exe" /backup” and I could use that in simple .cmd scripts. worked great and worked well over vpn.