VBR9.5 Free Powershell problems

PowerShell script exchange

VBR9.5 Free Powershell problems

Veeam Logoby JohnWarby » Wed Jul 19, 2017 10:37 am

Hi,
I have set up the free edition of v9.5 for use with a 2 node Hyper-V Cluster, but I am struggling to get scripted backups working. I have a script which definitely works, because It has done so before. My problem is that PowerShell does not appear to be working properly. ~if I run the following in the VBR PowerShell Toolkit:

Find-VBRHvEntity -Name * -Server Cluster.Domain.local

i get an error:

Find-VBRHvEntity : Veeam PowerShell snap-in was loaded from an incorrect location.

I have deleted the Registry hive, as per powershell-f26/veeam-snap-in-loaded-from-an-incorrect-location-t38136.html, and I have re-installed the VBR Console. I have tried running the Install-VeeamToolkit and the Initialize-Veeamtoolkit PowerShell scripts, but I still get the same problems.

The script i am running is from http://blog.mwpreston.net/2015/04/29/sc ... n-backups/ and I have had it working on this server. However, it only worked once, for one VM. As per the comments section, I amended the script on the URL to use Find-VBRHvEntity instead of VBRViEntity.

I'm not sure if it is relevant, but I also cannot get any Veeam commands to work in the Powershell ISE, even after running "C:\Program Files\Veeam\Backup and Replication\Backup\Initialize-VeeamToolkit.ps1" and "C:\Program Files\Veeam\Backup and Replication\Backup\Install-VeeamToolkit.ps1". If I open the toolkit from the VBR console menus, I can see the various VBR Commands, but if I run the commands I get the same error message.

Get-VBRServer : Veeam PowerShell snap-in was loaded from an incorrect location.

I know that because Find-VBRHvEntity will not run, the whole script will fail. So I need to understand and fix why the PowerShell location is wrong.

The plan once this is working is to set up several jobs, one VM per job. These will be scheduled via Windows Task Scheduler, by passing parameters into the task, as required by the script I'm running. I'll do this using the guidance here: https://blog.kaniski.eu/2017/04/schedul ... arguments/

Please can anyone advise on how to fix the PowerShell errors?

Many Thanks

Regards

John
JohnWarby
Novice
 
Posts: 6
Liked: never
Joined: Tue May 13, 2014 4:27 pm
Full Name: John Warby

Re: VBR9.5 Free Powershell problems

Veeam Logoby JohnWarby » Wed Jul 19, 2017 10:51 am

Quick Update. Running Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue in the ISE Windows allows me to see all the veeam commands, but if I run them in ISE, I still get the Get-VBRServer : Veeam PowerShell snap-in was loaded from an incorrect location error.

Regards

John
JohnWarby
Novice
 
Posts: 6
Liked: never
Joined: Tue May 13, 2014 4:27 pm
Full Name: John Warby


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 1 guest