Saturday, January 28, 2006

Setting Audit entries via batch file.

Setting Audit entries via batch file.
You can use this batch file to set auditing entry to a folder. This batch adds “delete subfolders and files” and “delete” auditing entries for “authenticated users” to TEST folder’s SACL. Send this batch to servers with psexec @file parametre to run.
------------
net use Z: \\Domain.com\sysvol\Domain.com\SCRIPTSZ:\SetACL.exe -on "F:\TEST" -ot file -actn ace -ace "n:s-1-5-11;p:delete;m:aud_succ;w:sacl;s:y" -ace "n:s-1-5-11;p:del_child;m:aud_succ;w:sacl;s:y"
net use Z: /delete
-------------
* SetACL is assumed in the \\Domain.com\sysvol\Domain.com\SCRIPTS* SetACL.exe is free for everyone. The current version of SetACL and more examples can be found on sourceforce.net