How to automate the removal of Windows DirectAudit service?
1. Have one user added to the non-audited user list (can do it through the GP) that will perform the removal operation.
Registry location – HKEY_LOCAL_MACHINE\SOFTWARE\Centrify\DirectAudit\Agent
Name – NoAuditList
Type – REG_SZ
Value – Comma-separated SIDs of non-audited users/groups in SDDL format
Sample value – S-1-5-21-1361594701-3907135683-953422115-2122,S-1-5-21-1361594701-3907135683-953422115-2123
Note: Specify SID of the AD group
2. Have all the user logout from the windows machine
3. Wait until the offline data got despooled
To ensure that the audit data is getting despooled correctly, please take a look at the spool directory's size. In a healthy DA environment, this size will typically be in Kilobytes (e.g. 8KB or so). The following PS cmd has to be run for extracting the size out (example uses the default spool location)
#(Get-ChildItem 'C:\ProgramData\Centrify\DirectAudit\Spool' -Recurse | Measure-Object -Property Length -sum).sum /1KB
It is recommended to check the C:\ProgramData\Centrify\Audit\Wash\spool folder if anything left behind
4. To un-configure/remove DA services from a Windows machine
The following command has to be run from the "Centrify Agent for Windows" installation folder...
#C:\Program Files\Centrify\Centrify Agent for Windows\agent.configure.exe /unconfigure
Then the DA windows daemon will be stoped and then completely unconfigured.
As this is an auto-removal, therefore, the process can be done by written a single script.