How to install powershell snapin Veeam B&R 9

PowerShell script exchange

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

Veeam Logoby v.Eremin » Wed Oct 26, 2016 11:25 am

Good to know that the issue is tracked and will be fixed in the nearest future. Thanks for sharing the outcome of support investigation; appreciated.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 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 » Thu Oct 27, 2016 8:19 am 1 person likes this post

I can confirm the manual process has worked nicely to clear the CBT warnings and bring my backup windows right down.

Just FYI if anyone is interested. I have quite a few hosts and to speed up the process I was able to script this routine in PowerShell:

Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue

# Connects to the Veeam Enterprise Manager server.
Connect-VBRServer -Server "Veeam EM Server"

# Gets a list of all Hyper-V hosts from the Veeam SQL database.
$Servers = ((Get-VBRServer) | where {$_.Type -eq "HvServer"}).name

# Clears the CBT data for each host resolved from the previous command.
foreach($Server in $Servers) { Write-Output "Clearing CBT on " $Server}
foreach($Server in $Servers) { Remove-Item "\\$Server\C$\Support\Veeam_Reg_Export\veeamctdb.reg" -Confirm:$false }
foreach($Server in $Servers) { (Get-Service -ComputerName $Server -Name "veeamfct").Stop() }
foreach($Server in $Servers) { Invoke-Command -ComputerName $Server {reg export "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VeeamFCT\Parameters\CTDB" "C:\Support\Veeam_Reg_Export\veeamctdb.reg"}}
foreach($Server in $Servers) { Invoke-Command -ComputerName $Server {pushd;sl HKLM:\SYSTEM\CurrentControlSet\Services\VeeamFCT\Parameters; if(test-path CTDB){Remove-Item CTDB -Recurse}ELSE{"Key Dose Not Exist"};popd}}
foreach($Server in $Servers) { (Get-Service -ComputerName $Server -Name "veeamfct").Start() }   


For this to work you just need to setup a C:\Support\Veeam_Reg_Export folder on each Hyper-V host.
Or if you want a different path, just amend the above script.

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 v.Eremin » Thu Oct 27, 2016 12:20 pm

Hopefully, we will have this issue fixed in the upcoming release, so, you won't have to clearing registry either manually or automatically any longer. Anyway, thanks again for providing our community members with the found resolution.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Previous

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests