Jump to content
Sign in to follow this  
erloyaamit

How to clear Event viewer with admin rights?

Recommended Posts

erloyaamit

I want 2 clear event logs of domain machines with domain user (Restricted user) logged in.

I m using _EventLog__Clear to clear logs. but this command runs with Admin rights. As domain user doesn't have right

to clear Application, Security etc. logs.

Is there any way so that i can use _EventLog__Clear to run with Admin rights. like runas command.

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
rcmaehl

Use #RequireAdmin at the beginning of your script.

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×