To audit file and folder access, object-level auditing must be enabled. This can be achieved in three ways:
Note:
When removing object-level auditing for a set of folders, the <type>strong> parameter is not mandatory.
Once you have the CSV file that lists all the servers and the type of auditing required, go to the <Installation Directory>\bin folder within the PowerShell command prompt and type in:
.\ADAP-Set-SACL.ps1 -file '.\file name' -mode add (or) remove -recurse true (or) false -username DOMAIN_NAME\username
Where:
| Parameter | Input variable | Mandatory |
|---|---|---|
| -mode | The name of the CSV file containing the list of shared folders. | Yes |
| -file | Add: Sets the object-level auditing settings. (or) Remove: Removes the object-level auditing settings. | Yes |
| -recurse | True: Replace all subfolder object-level auditing settings with inheritable auditing settings applied to the chosen folder. (or) False: Apply object-level auditing settings only to the chosen folder. Note: By default, the -recurse parameter is set to false. | No |
| -username | DOMAIN_NAME\username: The user with the privileges to set the object-level auditing settings for the file or folder (no cross-domain support). | No |
For example