Solved

Enable Windows Audit via MDT 2012 Update 1

Posted on 2013-02-04
6
517 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

730 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