This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-PSSnapin VeeamPSSnapin -ErrorAction SilentlyContinue | |
#connect to your backup server | |
Connect-VBRServer -Server "YOURBACKUPSERVER" | |
#get this machine (the data processor) ip address | |
$targetServer = (Get-NetIPAddress -AddressFamily IPv4 | Select-Object -First 1).IPAddress | |
$targetServerCreds = Get-VBRCredentials -Name "lab\administrator" | |
#backup job name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#alert at or over this amount | |
$alertOverGB = 100; | |
#your email settings | |
$emailSettings = @{ | |
To = 'you@example.local' | |
From = 'backupreports@example.local' | |
Smtpserver = 'smtp.example.local' | |
Subject = "{{VBRServer}} jobs over $($alertOverGB)GB" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string]$AlarmName,[string]$ObjectName,[string]$Information,[string]$TriggeredOn,[string]$State,[string]$PreviousState,[int]$AlarmId) | |
<# | |
.SYNOPSIS | |
VeeamOneReciever Alert | |
.DESCRIPTION | |
Script to send alarms to the VeeamONEReceiver API | |
.Notes | |
NAME: AlertTo-VeeamOneReceiver.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---------------------------------[Slack Setup]--------------------------------- | |
#bot name to post into slack | |
$slackBotName = "YourSlackBotName" | |
#your slack webhook key - blank for no trigger | |
$slackKey = "YOURSLACKWEBHOOK" | |
#slack channel to post into | |
$slackChannel = "#YourChannel" | |
#---------------------------------[Services Setup]--------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#enter all VC's you need to connect too, this includes repliction clusters as we need to find the matching VM. | |
$virtualCenters = @('vc1','vc2') | |
foreach ($vc in $virtualCenters) | |
{ | |
Connect-VIServer $vc #connect to the vc | |
} | |
$allVMs = Get-VM | Select-Object Name, @{N="Drives"; E={($_ | Get-HardDisk).count }}, ResourcePool | |
$replicas = $allVMs | Where-Object { $_.Name -like '*_replica' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$jobName = "Your Backup Job" | |
$backup = Get-VBRBackup -Name $jobName | |
if ($backup) { | |
$backup.GetAllStorages() | | |
Sort-Object CreationTime -Descending | | |
Format-Table @{Name="VM"; Expression={$_.PartialPath.ToString().Split('.')[0]}}, | |
# @{Name="Filename"; Expression={$_.PartialPath}}, #uncomment if you want the filename on disk. | |
@{Name="Data Size GB"; Expression={[math]::Round($_.Stats.DataSize/1GB, 2)}}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-PSSnapin VeeamPSSnapin -ErrorAction SilentlyContinue | |
#connect to your backup server | |
Connect-VBRServer -Server "YOURBACKUPSERVER" | |
#get this machine (the data processor) ip address | |
$targetServer = (Get-NetIPAddress -AddressFamily IPv4 | Select-Object -First 1).IPAddress | |
$targetServerCreds = Get-VBRCredentials -Name "lab\administrator" | |
#backup job name |