Have any questions

Customized Event based Script for Altaro Physical Backup Software

There was one script requirement from one of our clients based on the Altaro Physical Backup Software product and they needed an event base script out of it as below.

Event ID 5100 – Successful Backup eventEvent ID 5101 – Warning Backup eventEvent ID 5102 – Failed Backup event

Script should look back X number of days and if the backup event found is 5100, it’s should show successful and if it shows 5101 or 5102 – it should display an error.He wanted the Output as below:5100 = Backup erfolgreich5101 = Backup fehlerhaft5102 = Backup fehlerhaft

If the backup event is successful, the output will be 0. If it has failed, shows a warning or if no event is found, it will give us 1001.

Syntax

#param([Int32]$days)
if($days -ne $null -and $days -ne ”){
$success_5100 = Get-EventLog -LogName Application -InstanceId 5100 -Source “Altaro Physical Server Backup” -After (Get-Date).AddHours(-24*$days) -erroraction silentlycontinue
$line = $success_5100 | measure-object -line

Download Full Script

Purpose:Weekly Maintenance of a single device or all devices in the domain
Modification:The user can modify the number of days
Type:PowerShell (.ps1)
Compatibility:Run with PowerShell
Tags:altaro physical backup software, backup status
Reference link: