How to get the Veeam snapin registered on Windows Server 2016?
I am aware of the sticky topic in this forums, I am aware of all those .reg-files flying around, PS-Version issues you can have (I read version 3.0 is recommended and not Powershell Version 2.0, however Server 2016 comes with Version 5.1!) etc. I'm out of ideas.
PS C:\Users\administrator.my-domain> cd "C:\Program Files\Veeam\Backup and Replication\Console"
PS C:\Program Files\Veeam\Backup and Replication\Console> .\Install-VeeamToolkit.ps1
Add-PSSnapin : Cannot load Windows PowerShell snap-in VeeamPSSnapIn because of the following error: The Windows PowerShell snap-in module C:\Program Files\Veeam\Backup
and Replication\Backup\Veeam.Backup.PowerShell.dll does not have the required Windows PowerShell snap-in strong name Veeam.Backup.PowerShell, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=bfd684de2276783a.
At C:\Program Files\Veeam\Backup and Replication\Console\Initialize-VeeamToolkit.ps1:197 char:1
+ Add-PSSnapin VeeamPSSnapIn
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (VeeamPSSnapIn:String) [Add-PSSnapin], PSSnapInException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
Get-PSSnapIn : No Windows PowerShell snap-ins matching the pattern 'VeeamPSSnapIn' were found. Check the pattern and then try the command again.
At C:\Program Files\Veeam\Backup and Replication\Console\Initialize-VeeamToolkit.ps1:199 char:11
+ $snapIn = Get-PSSnapIn "VeeamPSSnapIn"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (VeeamPSSnapIn:String) [Get-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : NoPSSnapInsFound,Microsoft.PowerShell.Commands.GetPSSnapinCommand
Welcome to the Veeam Backup and Replication PowerShell Toolkit!
To list available commands, type Get-VBRCommand
To open online documentation on all available commands, type Get-VBRToolkitDocumentation
I'd recommend reaching our support team for further investigation. By the way, does it work, if executed manually from Backup Console (Menu - > Console -> PowerShell?) Thanks.
Tried another fresh server, same thing. Not interested in a software I have to hassle with support for basic stuff like this, but thanks for your answer.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\VeeamPSSnapIn]
"PowerShellVersion"="2.0"
"Vendor"="Veeam"
"Description"="This is a PowerShell snap-in that includes the Veeam's cmdlet."
"VendorIndirect"="VeeamPSSnapIn, Veeam"
"DescriptionIndirect"="VeeamPSSnapIn,This is a PowerShell snap-in that includes the Veeam's cmdlet."
"Version"="8.0.0.0"
"ApplicationBase"="C:\\Program Files\\Veeam\\Backup and Replication\\Backup"
"AssemblyName"="Veeam.Backup.PowerShell, Version=8.0.0.0, Culture=neutral, PublicKeyToken=bfd684de2276783a"
"ModuleName"="C:\\Program Files\\Veeam\\Backup and Replication\\Backup\\Veeam.Backup.PowerShell.dll"
New:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\VeeamPSSnapIn]
"PowerShellVersion"="5.1"
"Vendor"="Veeam"
"Description"="This is a PowerShell snap-in that includes the Veeam's cmdlet."
"VendorIndirect"="VeeamPSSnapIn, Veeam"
"DescriptionIndirect"="VeeamPSSnapIn,This is a PowerShell snap-in that includes the Veeam's cmdlet."
"Version"="9.5.0.0"
"ApplicationBase"="C:\\Program Files\\Veeam\\Backup and Replication\\Console"
"AssemblyName"="Veeam.Backup.PowerShell, Version=9.5.0.0, Culture=neutral, PublicKeyToken=bfd684de2276783a"
"ModuleName"="C:\\Program Files\\Veeam\\Backup and Replication\\Console\\Veeam.Backup.PowerShell.dll"
Delete your old regedit hive, then save the "New:" thing in a .reg-file and run it. Just replacing "8.0.0.0" with "9.5.0.0" might be sufficient, too. Done.
I notice we don't need to register the snapin for newer versions of Powershell. I'm using Powershell 5. This might work for older versions too. I simply copy all files/subfolders of c:\Program Files\Veeam\Backup and Replication\Console
to another server anywhere you like. Then use import-module directly with Veeam.Backup.PowerShell.dll