Solved

Changing Audit Policies through scripting

Posted on 2016-09-26
5
84 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

751 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