I upgraded from version 6.1 to version 6.5 on Monday this week. Since doing so I have found that the PowerShell ISE interface is throwing an error when trying to load the Veeam PSS Snap-in. The Snap-in loads correctly in a normal PowerShell window but won't load in the ISE interface. The error I get in the ISE interface looks like this:
Add-PSSnapin : Cannot load Windows PowerShell snap-in VeeamPSSnapIn because of the following error: Could not load file or assembly 'file:///C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll
' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
At C:\Util\SpaceCheck.ps1:2 char:13
+ Add-PSSnapin <<<< -Name VeeamPSSnapIn #-ErrorAction SilentlyContinue
+ CategoryInfo : InvalidArgument: (VeeamPSSnapIn:String) [Add-PSSnapin], PSSnapInException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
I commented out the "-ErrorAction" section for troubleshooting.
I have a case open with tech support (reference number ref:_00D30RWR._50060MWNq4). I have uninstalled/reinstalled the B&R software but that didn't fix the problem. Anyone have a suggestion?
However I could get around it by running the "Install-VeeamToolkit.ps1" file found in the installation folder, default location "C:\Program Files\Veeam\Backup and Replication"
I found out why this is happening(Thank you Seth!). I am running the ISE on a Windows 2008 R2 SP1 server that hosts B&R. The problem lies with the ISE and PowerShell Host Console. These products use PowerShell 2.0 which supports up to .Net 3.5. The newest Veeam snap-in is using .Net 4.0. There are several ways to fix the problem other than Tobias' solution of running the Install-VeeamToolKit.ps1. One is to modify the registry (http://stackoverflow.com/questions/2094 ... -4-runtime) to force the ISE to support .Net 4.0 but that has unintended negative side effects of not being able to run .Net 3.5 and earlier apps. Another solution is to use a different editor than the ISE like PowerGUI (http://powergui.org/index.jspa). Lastly, and this is the option I went with, upgrade to PowerShell 3.0 by installing Windows Management Framework 3.0 (http://www.microsoft.com/en-us/download ... x?id=34595) which supports .Net 4.0 natively. I hope this helps!
BGilbert wrote:I found out why this is happening(Thank you Seth!). I am running the ISE on a Windows 2008 R2 SP1 server that hosts B&R. The problem lies with the ISE and PowerShell Host Console. These products use PowerShell 2.0 which supports up to .Net 3.5. The newest Veeam snap-in is using .Net 4.0. There are several ways to fix the problem other than Tobias' solution of running the Install-VeeamToolKit.ps1. One is to modify the registry (http://stackoverflow.com/questions/2094 ... -4-runtime) to force the ISE to support .Net 4.0 but that has unintended negative side effects of not being able to run .Net 3.5 and earlier apps. Another solution is to use a different editor than the ISE like PowerGUI (http://powergui.org/index.jspa). Lastly, and this is the option I went with, upgrade to PowerShell 3.0 by installing Windows Management Framework 3.0 (http://www.microsoft.com/en-us/download ... x?id=34595) which supports .Net 4.0 natively. I hope this helps!
Brian
Thank you Brian! I had to install PowerShell 3.0 AND run Install-VeeamToolKit.ps1 in order to get Veeam's snap-in to load. Server 2008 R2 by the way.
We have a customer running into this problem. However they have already installed version 4.0 (powershell) and apparently v3 and v4 can not co-exist. Any solution or should we log a case?
I am facing the same issue and was wondering if the Powershell was compatible with 2012R2. If so is there documentation on how to make it work or should I simply open a case?