PowerShell Script: Apply Best Practices to Trend Micro Control Manager (TMCM)

I’ve created a script that applies best practices to TMCM 5.5 or 6.0 servers, and tested on PowerShell v2 through 4.


Files that are backed-up, and then modified:

  • ~TMCMInstallPath\SystemConfiguration.xml
  • ~TMCMInstallPath\ProcessManager.xml

Changes this script makes:

ProcessManager.xml

  • Certain thread counts are increased, via TMCM Best Practices documentation available from Trend Micro

SystemConfiguration.xml

  • Command tracking timeouts and log purge ranges, purging timeout, and limits for saved temp log files are modified via TMCM Best Practices documentation available from Trend Micro.

Versions:

  • 1.0 – 05/29/14    – Initial Version

Snippet from script, modifying the ProcessManager.xml:

# ProcessManager.xml Optimization
$ProcessManager = Get-Content ProcessManager.xml
if ($ProcessManager | Select-String '-iocp_thread_number=11') {
  Write-Output "Default ProcessManager.xml found. Modifying..."
if (!(Test-Path "ProcessManager.xml.$TimeStamp")) {
  Copy-Item "ProcessManager.xml" "ProcessManager.xml.$TimeStamp"
  Write-Output "Original backed up as ProcessManager.xml.$TimeStamp"
}
$NewProcessManager = $ProcessManager -replace 'name=SC_TVCS_Command_Processor -thread_number=20','name=SC_TVCS_Command_Processor -thread_number=50'
$NewProcessManager = $NewProcessManager -replace '-iocp_thread_number=11','-iocp_thread_number=25'
$NewProcessManager | Out-File ProcessManager.xml -Force
Write-Output "Modified."
$ChangeMade = $true
}

You can find the entire script located in this TechNet script location.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s