How to install powershell snapin Veeam B&R 9

PowerShell script exchange

How to install powershell snapin Veeam B&R 9

Veeam Logoby nikods » Fri Apr 22, 2016 6:57 am

Hi all,
I can not get power shell commands to work, there is no installation file in Backup dir on the iso file and I can not find how to install, just for B&R 8.
Any ideas?
Thanks
Niko
nikods
Novice
 
Posts: 7
Liked: 1 time
Joined: Mon May 25, 2015 11:46 am
Full Name: Dragan

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby tdewin » Fri Apr 22, 2016 9:29 am

in v9, it is installed by default (also as part of the remote console). However you might need to load the snapin before you can use for example get-vbrbackup. Use "asnp veeampssnapin" to load it.
tdewin
Veeam Software
 
Posts: 1091
Liked: 380 times
Joined: Fri Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby v.Eremin » Fri Apr 22, 2016 10:03 am

I can not get power shell commands to work

Follow the Timothy's advice or post the exact error you get while trying to access VB&R-specific cmdlets. Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby nikods » Mon Apr 25, 2016 8:40 am

On the host server powershell remoting is enabled, I am executing from backup server, run as admin, admin is domain admin but I get:

Code: Select all
PS C:\Users\Administrator.xx> asnp veeampssnapin
PS C:\Users\Administrator.xx> Reset-HvVmChangeTracking -Server HOSTSrv -VMName "srvname"
Reset-HvVmChangeTracking : Failed to execute WMI Query.
At line:1 char:1
+ Reset-HvVmChangeTracking -Server HOSTSrv -VMName "srvname"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Reset-HvVmChangeTracking], CRegeneratedTraceException
    + FullyQualifiedErrorId : Veeam.Backup.Common.CRegeneratedTraceException,Veeam.Backup.PowerShell.Command.ResetHvVm
   ChangeTracking


but I keep getting this. Can I install veeam snapins on host server and execute command there?
nikods
Novice
 
Posts: 7
Liked: 1 time
Joined: Mon May 25, 2015 11:46 am
Full Name: Dragan

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby v.Eremin » Mon Apr 25, 2016 8:49 am

Doesn't look like a PS-specific error. Therefore, you'd better open a ticket with our support team and let them investigate it directly. Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby nikods » Mon Apr 25, 2016 11:31 am 1 person likes this post

OK, I will do that, thanks!
nikods
Novice
 
Posts: 7
Liked: 1 time
Joined: Mon May 25, 2015 11:46 am
Full Name: Dragan

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby vmniels » Mon Apr 25, 2016 12:28 pm

VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be
vmniels
Veeam Software
 
Posts: 1583
Liked: 349 times
Joined: Mon Jul 15, 2013 11:09 am
Full Name: Niels Engelen

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby nikods » Tue May 17, 2016 9:11 am

Yes it is and all windows power shell commands work but veeam comandlets are not working. I resolved the issue via workaround but I would like power shell veeam comandlets to work :-)
nikods
Novice
 
Posts: 7
Liked: 1 time
Joined: Mon May 25, 2015 11:46 am
Full Name: Dragan

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby v.Eremin » Tue May 17, 2016 3:07 pm

I'm interested what kind of a workaround you've implemented to resolve the issue; might be helpful to new comers. Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

[MERGED] Veeam Powershell Snapin

Veeam Logoby BenHolland » Tue Oct 25, 2016 10:30 am

Dear forum,

In need to reset the CBT data for my backups after some server storage migrations.

However upon running the script:

Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
Get-VBRLocalhost
Reset-HvVmChangeTracking -Server HostServer -VMName "VMName"

I get the following error:

Code: Select all
Reset-HvVmChangeTracking : Failed to execute WMI Query


I have checked and WMI permissions on the host servers are fine as per:
https://technet.microsoft.com/en-us/lib ... 71551.aspx

Setup:
Hypervisor - Microsoft Hyper-V.
Host Server OS - Microsoft Server 2012 R2.
Veeam B&R version - 9.0.0.1715.
Backup type - Off Host Proxy.
Storage Connectivity - Fibre Channel.
Storage repository - HP StoreOnce physical appliance.

Any help would be appreciated.

Kind regards,
Ben Holland
BenHolland
Novice
 
Posts: 5
Liked: 3 times
Joined: Tue Oct 25, 2016 10:15 am
Full Name: Ben Holland

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby v.Eremin » Tue Oct 25, 2016 11:03 am

Might be worth reaching our support team. Within a support ticket it would harm to mention that problem does not appear to be PowerShell related one, as support team typically do not assist clients with custom scripts in place. Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby BenHolland » Tue Oct 25, 2016 11:14 am

Hi Thanks for the reply.

I will reach out to support in that case.
I'm surprised to hear that this would be classed as a custom script. Unless there is another way to reset the CBT data other than this command.

Regards,
Ben
BenHolland
Novice
 
Posts: 5
Liked: 3 times
Joined: Tue Oct 25, 2016 10:15 am
Full Name: Ben Holland

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby v.Eremin » Tue Oct 25, 2016 11:19 am

I would be surprised as well. I was just sharing with you our general support policy, according to which most of custom-written scripts are out of support scope.

Kindly, provide here a support ticket number (once you have one) for the convenience of future readers.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13558
Liked: 1006 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby BenHolland » Tue Oct 25, 2016 11:28 am 1 person likes this post

Ok no problem.
My case number is 01957964.

Thanks,
Ben
BenHolland
Novice
 
Posts: 5
Liked: 3 times
Joined: Tue Oct 25, 2016 10:15 am
Full Name: Ben Holland

Re: How to install powershell snapin Veeam B&R 9

Veeam Logoby BenHolland » Wed Oct 26, 2016 9:04 am 1 person likes this post

Just an update on this.
Support have informed me that there is a known bug running this command in 9.0.0.1715 with Hyper-V hosts and this should be resolved in the up and coming 9.5 release.

My options are until 9.5 release:
Turn off CBT - Not great as my backups are taking hours and spilling into the next working day.
Manually removing the CTDB registry values (forcing a CBT reset) as per https://www.veeam.com/kb1934 - I will attempt this today and will share my results after a couple of job runs.

Thanks,
Ben
BenHolland
Novice
 
Posts: 5
Liked: 3 times
Joined: Tue Oct 25, 2016 10:15 am
Full Name: Ben Holland

Next

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 6 guests