Enable BitLooker on any job automatically by using PowerShell
1 2 3 4 5 6 7 8 9 10 11 |
asnp VeeamPSSNapin foreach ($Job in Get-VBRJob | where {$_.JobType -eq “Backup” -or $_.JobType -eq “Replica”}) { $Options = $Job.GetOptions() $Options.ViSourceOptions.DirtyBlocksNullingEnabled = $True $Job.SetOptions($Options) } |
Test Service Provider Gateway (Cloud Connect)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
clear # Parameter Veeam Cloud Connect Gateway $Servers = 'baas.serviceprovider.net' $Port = '6180' # NSLOOKUP foreach ($Server in $Servers) { $Addresses = $null try { $Addresses = [System.Net.Dns]::GetHostAddresses("$Server").IPAddressToString } catch { $Addresses = "Can't resolve hostname." } } # Test Veeam Cloud Connect Ports foreach($Address in $addresses) { $Socket = New-Object System.Net.Sockets.TcpClient; try { Write-Host "Connecting to "$Address":"$Port" (TCP).."; $Socket.Connect($Address, $Port); Write-Host -foreground "green" "Connection successful [Gateway]"; if ($Socket.Connected) { $Socket.Close() } } catch { Write-Host -foreground "red" "Connection failed [Gateway]"; } finally { $Socket.Dispose(); } } |
Get Veeam backup files smaller than xx MB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#Get Veeam backup files smaller than 30MB $directory = 'D:\Backups' $filesize = 30Mb $validate = Get-ChildItem $directory -Recurse | where {! $_.PSIsContainer -and $_.Extension -eq ".vib" -or $_.Extension -eq ".vrb" -or $_.Extension -eq ".vbk" -and $_.Length -lt $filesize} $x = $validate | measure if($x.Count -ge 1){ Write-Host " ALERT - file(s) found:" $x.Count "" -foregroundcolor "black" -backgroundcolor "red" foreach ($row in $validate){ $row.Name + " [" + $row.Directory + "]" } } else { Write-Host " No issue found " -foregroundcolor "black" -backgroundcolor "green" } |