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


Active: IRC UDF, WindowEx UDF
Discontinued: GithubBubbleSort 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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.