Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
jayscarff
Service Provider
Posts: 114
Liked: 12 times
Joined: Nov 15, 2016 6:56 pm
Location: Cayman Islands
Contact:

Script a job notification to print.

Post by jayscarff »

Afternoon,

I've got a server with agent for windows, doesn't have internet or email ability. I was thinking scripting something to print the report daily, but i can see the job log but printing that would be silly. Is there a way to generate a summary thats saved locally? I could then script it to print.

Thanks
Jason
VMCE
Dima P.
Product Manager
Posts: 14716
Liked: 1703 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Script a job notification to print.

Post by Dima P. »

Hi Jason,

You can either dig into application logs from C:\ProgramData\Veeam\Endpoint or rely on Windows events.
jayscarff
Service Provider
Posts: 114
Liked: 12 times
Joined: Nov 15, 2016 6:56 pm
Location: Cayman Islands
Contact:

Re: Script a job notification to print.

Post by jayscarff » 1 person likes this post

Thanks!

Code: Select all

$user = "Jason"
$logfile = "c:\temp\veeamevent.txt"


wevtutil qe "Veeam Agent" /q:"*[System [(EventID=190)]]" /c:1 /rd:TRUE /f:text >$logfile
#wevtutil.exe qe Application /q:"*[System [(EventID=1)]]" /c:1 /rd:TRUE /f:text >$logfile

$msg_date = get-content -Path $logfile |where-object {$_ -like '*Date*'}
$msg_description = get-content -Path $logfile |where-object {$_ -like '*Job details*'}
$message = "VEEAM BACKUP:", $msg_date,$msg_description
msg.exe $user $message
get-content -Path $logfile | out-printer
Jason
VMCE
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 29 guests