Solved

Enable Windows Audit via MDT 2012 Update 1

Posted on 2013-02-04
6
512 Views
Last Modified: 2013-02-18
Hi All,

I have created the batch file below to enable auditing in Windows 2008 R2...
The batch file works fine when run manually, but it does not set the audit information via MDT 2012 Update 1.

Not sure if I am missing anything, if not is there another way to set it natively via Powershell or WMI.

Thanks in advance

-Steve
0
Comment
Question by:Stevolee
  • 4
  • 2
6 Comments
 
LVL 23

Expert Comment

by:Nagendra Pratap Singh
ID: 38850801
Where is the file?
0
 

Author Comment

by:Stevolee
ID: 38850829
Hi,

Sorry I thought I attached the file...

I have reattached it and also copied it below:

Thx.



SET CURRENTDIR=%~dp0

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"Account Logon" /success:Enable /failure:Enable

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"DS Access" /success:Disable /failure:Enable

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"Account Management" /success:Enable /failure:Enable

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"Policy Change" /success:Enable /failure:Enable

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"Object Access" /success:Enable /failure:Enable

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"Logon/Logoff" /success:Enable /failure:Enable

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"Privilege Use" /success:Enable /failure:Enable

cmd.exe /c %SystemRoot%\system32\auditpol.exe /set /category:"System" /success:Enable /failure:Enable
install.cmd
0
 
LVL 23

Expert Comment

by:Nagendra Pratap Singh
ID: 38850852
BTW does the file run when played inside MDT2012?

Did it run before sp1?

Also please change lines to

echo "1" >> d:\text.txt

etc and see if they run.

D:\ should allow writing.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:Stevolee
ID: 38851238
Hi,

I have piped out the log and it shows that it ran successfully via MDT but the policies are not been applied... Meanwhile if I ran it manually it works fine and applies the policy.

I have only used MDT 2012 Update 1, I have not tried it on the older version.

I was hoping at this stage if no joy then perhaps any suggestions on how to use WMI or powershell to apply the policies...

Thanks in advance

-Steve
0
 

Accepted Solution

by:
Stevolee earned 0 total points
ID: 38884749
I ran the script using the runonce registry key worked a treat!
0
 

Author Closing Comment

by:Stevolee
ID: 38900873
found the solution myself
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
This article will help you understand what HashTables are and how to use them in PowerShell.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

896 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now