Before I start with the actual post I want to start with a little tip. Before you can run Veeam Powershell Toolkit scripts, you need to add the VeeamPSSnapin. You can do this via the following code:
if((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null){ Add-PSSnapin "VeeamPSSnapIn" }
So now you’re able to load the snapin, you can run your Veeam Powershell Toolkit scripts. In this post I want to show how to change the Processing Mode. You probably know the three modes:
You can find the Processing Mode options via the following Powershell script:
$vbrjobname = "Production" $vbrjob = Get-VBRJob | Where {$_.Name -eq $vbrjobname} $vbrjob.Info.Options.VDDKMode
So now you know which modes there are, but how do you change this option with Powershell? Well you can do this with the next script:
if((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null){ Add-PSSnapin "VeeamPSSnapIn" } $vbrjobname = "Production" $vbrjob = Get-VBRJob | Where {$_.Name -eq $vbrjobname} $DirectSAN = "san;nbd" $VirtualAppliance = "hotadd;nbd" $Network = "nbd" $mode = $VirtualAppliance if($vbrjob.info.options.VDDKMode -ne $mode){ $vddk = $vbrjob.GetOptions() $vddk.VDDKMode = $mode $vbrjob.SetOptions($vddk) Write-Host "VDDK mode changed to $mode" -ForegroundColor Green } else{ Write-Host "Nothing to change" -ForegroundColor Yellow }
Just save the script and change the $mode parameter to the option you want to use. The script will give you the following output:
Great blog !
– How is it possible to integrate these scripts in a web page ? So they would get executed from a web page ?
/Jonas
Hey dood, what would be the best way to direct the source and target destinations for something like moving the .VBKs to a local D: from the E:???????????
I dunno if where-object would be best or something you did above????
BTW: I’m just trying to Start-VBRBackupJob and not so much create new jobs….
Any ideas??