Solved

Changing Audit Policies through scripting

Posted on 2016-09-26
5
66 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

809 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