Solved

Changing Audit Policies through scripting

Posted on 2016-09-26
5
69 Views
Last Modified: 2016-10-17
Within the Local Security Policies on Windows, there's a category called Audit Policies. I'm trying to write a script that is capable of changing all the audit policies to success and failure, however I can't seem to figure out how to do it. I don't want to change the Advanced audit policies, just the audit policies under local policies in the Local Security Policy application. If that's possible through any scripting language, feel free to leave an example, and if it's not possible, could somebody please let me know, this has been bothering me awhile and I would like to get it out of the way. Thank you!
0
Comment
Question by:Anthony Redgrave
  • 2
  • 2
5 Comments
 
LVL 23

Expert Comment

by:Erik Bjers
ID: 41817077
If you have a domain you are better off doing this through group policy which can be applied to the entire domain or to a specific (or multiple) OU

The GPO settings are the same as the local security policy.
0
 
LVL 54

Assisted Solution

by:McKnife
McKnife earned 500 total points
ID: 41817647
Sure, GPOs are preferably used. If not possible:
Type
auditpol /set /?
at the command prompt.
0
 

Author Comment

by:Anthony Redgrave
ID: 41824796
I've already tried using the auditpol command. Although it works perfectly for the Advanced audit policies, it doesn't work for the ones just under local policies which is what I'm trying to change. Of course, I could just be entering the command wrong, but regardless, it's still bothersome.  I am not trying to set advanced audit policies, just the ones under local policies
0
 
LVL 54

Accepted Solution

by:
McKnife earned 500 total points
ID: 41824842
Works here when I execute those on win10, at the moment I have no access to win7.
Let's execute one together:
auditpol /set /user:yourusername /Category:"System" /success:enable /include
(you should of course use domainname\yourusername instead of just username if on a domain. Then again, if on a domain, why not take GPOs for this task?).
auditpol /set /Category:"System" /success:enable
Afterwards, open secpol.msc and find that auditing of system events is activated for success.
0
 

Author Closing Comment

by:Anthony Redgrave
ID: 41846992
Thank you
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl script to process a .csv file 18 45
How to monitor servers ? 4 24
troubleshoot a python script 8 26
IDE for Python 5 26
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question