Update WriteToEventLog.ps1

Fixed bug in line 116 which I used = (to set) instead of -eq (to compare) which resulted in setting ALL event logs to error