Hi everyone, I know this might be easy to you guys, but I m having a little trouble with my function script.
Here is the problem, I wrote a function to check to see if a service is running or not.
IF the service is running it going to log the time and date then exit.
else if, its going to query the event log and pull the latest event logs, then post them to a file, then restart the service.
Well my problem is this: I can either get the event logs and the service will not restart or if i change it around it will start the service and give me a error about pulling the event logs?
I m attaching a copy of my function, so please let me know where i m going wrong with my function
thanks again for your help