REM Step 2: Unload with password (store password securely in environment variable) sentinelctl.exe unload -p %S1_PASS% --quiet
REM Step 5: Reload the agent immediately sentinelctl.exe load echo %DATE% %TIME% - SentinelOne reloaded >> C:\Logs\sentinel_unload.log exit /b 0 Sentinelctl.exe Unload
REM Script: Temp_Unload_Agent.bat REM Purpose: Unload SentinelOne, run a legacy tool, then reload. REM Step 1: Log the action to a local file and Windows Event Log echo %DATE% %TIME% - Unloading SentinelOne for maintenance >> C:\Logs\sentinel_unload.log eventcreate /ID 9001 /L APPLICATION /T INFORMATION /SO "SentinelMgmt" /D "SentinelOne agent unload initiated" REM Step 2: Unload with password (store password
sentinelctl.exe unload By default, the agent may prompt for a if one has been set by the administrator. To bypass the prompt in a script: run a legacy tool
REM Step 3: Verify unload status sentinelctl.exe status | findstr "Loaded" if %ERRORLEVEL% EQU 0 goto UNLOAD_FAILED