Hello,
So i run this script against one of my Backup servers
$Machine = "Machine1"Get-Eventlog -Logname Application -Source "Backup Exec" -EntryType Warning -ComputerName $Machine -After (Get-Date).AddDays(-1) | Select-Object -ExpandProperty message
Output
Backup Exec Alert: Job Completed with Exceptions (Server: "machine1") (Job: "Machine1 Daily INC Backup") The job completed successfully. However, the following conditions were encountered: 86 files were skipped.
My issue is I only want my script to return a certain part of the output. i.e.
(Server: "machine1") (Job: "Machine1 Daily INC Backup") The job completed successfully.
Does anyone know I would go about achieving this? converting it to a string or trimming does't seem to work :(
Thanks in advance
J