Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Changing Audit Policies through scripting

Posted on 2016-09-26
5
Medium Priority
?
100 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 57

Assisted Solution

by:McKnife
McKnife earned 2000 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 57

Accepted Solution

by:
McKnife earned 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

972 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