Cannot bind parameter 'Server'. Cannot convert the "System.Management.Automation.Internal.Host.InternalHost" value of type "System.Management.Automation.Internal.Host.InternalHost" to type "Veeam.Backup.Core.CHost".
So sort of figured out it was needing a Object type reference from get-vbrserver
Which worked however, it didn't really pick the right option for where it was going to store it. It still picked the Default Backup Repository instead of "Server, e:\veeam"
Also looking for a way to run and check the status of the copy job as well.
unfortunately this is one of the cmdlets that need more work done to it for v6 as it does some weirdness like trying to login to you repositories via soap which will generate errors when adding a new job, for the second part you could use something like below
# Fetch the job
$Job = Get-VBRJob -Name "CopyJobName"
# Start the job
$Job| Start-VBRJob
# Loop until done
do {sleep 10}
while ($Job.GetLastState() -ne "stopped")
# Print status
"$($Job.Name) is $($Job.GetLastState())" | Out-Default
I do have to reset the job object to see the updated information. aka
$job = get-vbrjob -name "$vmName-cp"
Is there a way to change the Storage Target Repository ... i.e that Radio Button option from Backup to Server ?
I was thinking that these should all really be setup as Target Repositories and I have one of those for this folder instead of dealing with this other object for "This Server" ?
I've not found how to do it in the current cmdlets, there should have been new parameters added to the v6 version like -Repository and -Entity on the Add-VBRCopyJob cmdlet to deal with it or even a new one added, maybe Seth will know how to change it