As promised, here is the safe restart PowerShell script version that includes writing output to the Event Log.
I used the Write-Eventlog command to get the output into the event log. I started by defining the variables. The eventID and eventSource can be anything, eventLog and eventType need to match the parameters of the Write-Eventlog command.
#eventlog vars $eventLog = "System" $eventType = "Information" $eventID = 212 $eventSource = "SafeRestart"