Sanitize Agent Script

The latest Sanitize Agent script, SanitizeAgent_13.6.1.ps1, is targeted for SDP/Greyhound-era Agent cleanup, especially around interrupted scans and distributed-search state.

The latest Sanitize Agent script, SanitizeAgent_13.6.1.ps1, is targeted for SDP/Greyhound-era Agent cleanup, especially around interrupted scans and distributed-search state.

The script is meant to clear stale distributed search/task/progress state without wiping the entire Console application folder.

What does the Updated Sanitize Agent Script Do?

This is a Spirion Agent cleanup/sanitize script for Windows Agents.

Note the following key points about the script:

  1. It requires Administrator rights.
  2. It clears the console screen.
  3. It Force-stops these processes if they are currently running:
    1. IdentityFinderCmd
    2. IdentityFinder
    3. idfEndpoint
  4. It Stops the following service:
    1. IdentityFinderMessagingService
  5. It deletes these folders if they exist on the Agent machine:
    1. C:\ProgramData\Identity Finder\Application\Console\DistributedSearchInfo
    2. C:\ProgramData\Identity Finder\MCData
    3. C:\ProgramData\Identity Finder\Tasks
    4. C:\ProgramData\Identity Finder\TasksMonitor
    5. C:\ProgramData\Identity Finder\ScanProgress
    6. C:\ProgramData\Identity Finder\AdminData
    7. C:\Windows\Temp\IDFTmpDir
    8. %TEMP%\IDFTmpDir
  6. The script restarts the following services:
    1. IdentityFinderMessagingService
    2. IdentityFinderEndpointService
  7. The script writes an empty marker/log file such as:
    1. C:\ProgramData\Identity Finder\Logs\SanitizeAgent.MMddyyyy.HHmmss.txt

Key differences from SanitizeAgentv2 1.ps1

Compared with the older v2 script the latest script:

  • Stops/starts IdentityFinderMessagingService instead of IdentityFinderService.
  • Deletes only Application\Console\DistributedSearchInfo instead of the broader Application\Console folder.
  • Explicitly deletes the directory C:\Windows\Temp\IDFTmpDir.
  • Writes a timestamped text file - SanitizeAgent...txt - to the directory "C:\ProgramData\Identity Finder\Logs"
  • As with previous scripts this script still restarts the service IdentityFinderEndpointService.