Solved

Enable Windows Audit via MDT 2012 Update 1

Posted on 2013-02-04
6
511 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

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.

Join & Write a Comment

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
Synchronize a new Active Directory domain with an existing Office 365 tenant
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

708 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

10 Experts available now in Live!

Get 1:1 Help Now