PowerShell script exchange
Post Reply
SerSunal
Expert
Posts: 101
Liked: 5 times
Joined: Oct 27, 2021 8:07 pm
Full Name: Ser
Contact:

Script VeeamZIP Not Working

Post by SerSunal »

I am trying to do a Veeam ZIP by a Power Shell script and it returns error.
Does anyone know what he could be doing wrong?


It shows me the following error:

Code: Select all

Get-Module -Name Veeam.Backup.PowerShell

Connect-VBRServer -Server "Name_VeeamServer" -Port 9392

$vm = Find-VBRViEntity -Name "Name_VM"

$rep = Get-VBRBackupRepository -Name "Name:Repository"

Start-VBRZip -BackupRepository $ rep -Entity $ vm -RunAsync

ModuleType Version    Name                                ExportedCommands                                                                           
---------- -------    ----                                ----------------                                                                           
Manifest   1.0        Veeam.Backup.PowerShell             {Add-CTFile, Add-HP3Snapshot, Add-HP3Storage, Add-HP4Snapshot...}                          
WARNING: Failed to login to "IP Vcenter", port 443, user "administrator@vsphere.local", proxy srv: port:0
WARNING: Failed to login to "IP Vcenter", port 443, user "administrator@vsphere.local", proxy srv: port:0
Start-VBRZip : Cannot process argument transformation on parameter 'BackupRepository'. A backup repository with the specified name does not exist: $
At line:9 char:32
+ Start-VBRZip -BackupRepository $ rep -Entity $ vm -RunAsync
+                                ~
    + CategoryInfo          : InvalidData: (:) [Start-VBRZip], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Veeam.Backup.PowerShell.Cmdlets.StartVBRZip
soncscy
Veteran
Posts: 643
Liked: 312 times
Joined: Aug 04, 2019 2:57 pm
Full Name: Harvey
Contact:

Re: Script VeeamZIP Not Working

Post by soncscy »

Hi Ser,

> Cannot process argument transformation on parameter 'BackupRepository'. A backup repository with the specified name does not exist: $
At line:9 char:32

This is telling you the name you set for the repository doesn't exist as a repository name.

1. Are you targeting a Scale-out backup repository or just a Regular Repository? Scale-out repositories will need you to add the -Scaleout flag to the Get-VBRBackupRepository cmdlet
2. Are you positive the name is exactly as your repository is named in the Veeam console?

Do this as a test from a Veeam Powershell console:

Code: Select all

$rep = Get-VBRBackupRepository -Name "Name:Repository"
$rep
When you run $rep, it should return your repository and show you some info on it. if it doesn't, you made a typo in the first line somehow for -Name argument. Again, if you have a Scale out repo, you need to add in the -Scaleout flag
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests