I am 100% new at Powershell, I have looked around a bit and not really found a whole lot on this topic, but I apologize if this has been answered elsewhere.
There is a Service that stops functioning every now and then, generally every day around 7am, to 8am, and the only way that I can restore its functionality is to restart the services. Associated with the software.
I am parsing through the event log to find the particular error every 15 minutes.
$lookForError = get-eventlog -before $currentDate -after $pastDate -logname application -source "Windows Backup"
$itCrashed = $FALSE
$lookForError
<#
while($itCrashed = false)
{
if ($lookForError -eq )
}#>
The general idea here, is to check if the event has occurred, if it has, changed itCrashed to true, exit the loop and initiate the service restart command.
I am not too sure on how I detect the existence of said error using powershell.