Submit a ticketCall us
Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Cannot run specific exe files from system32 folder in SAM Powershell Monitor component

Cannot run specific exe files from system32 folder in SAM Powershell Monitor component

Updated 30th October 2018

Overview

If you are using SAM Powershell Monitor component and try to call a specific .exe file from the windows system32 folder such as Tftp.exe or Telnet.exe then it may return an error message like:

 

The term 'C:\Windows\System32\TFTP.EXE' is not recognized as the name of a cmdlet, 
function, script file, or operable program. Check the spelling of the name, 
or if a path was included, verify that the path is correct and try again

 

To determine what applications beginning with t are found using this Powershell monitor, you can first paste into Powershell component monitor a wildcard for the first character such as t*.exe.

 

$dir = dir c:\windows\system32\t*.exe
Write-host "Message: $dir"
Write-host "Statistic: 0"

 

Result:

 

C:\windows\system32\takeown.exe
C:\windows\system32\TapiUnattend.exe 
C:\windows\system32\taskkill.exe 
C:\windows\system32\tasklist.exe 
C:\windows\system32\Taskmgr.exe 
C:\windows\system32\tcmsetup.exe 
C:\windows\system32\TCPSVCS.EXE 
C:\windows\system32\tdlrecover.exe 
C:\windows\system32\ThumbnailExtractionHost.exe 
C:\windows\system32\timeout.exe 
C:\windows\system32\TokenBrokerCookies.exe 
C:\windows\system32\TpmInit.exe 
C:\windows\system32\tracerpt.exe 
C:\windows\system32\TRACERT.EXE 
C:\windows\system32\tscon.exe 
C:\windows\system32\tsdiscon.exe 
C:\windows\system32\tsecimp.exe 
C:\windows\system32\tskill.exe 
C:\windows\system32\TSTheme.exe 
C:\windows\system32\TsWpfWrp.exe 
C:\windows\system32\typeperf.exe 
C:\windows\system32\tzutil.exe

 

As you can see above, the TFTP is indeed missing.

Environment

  • Solarwinds SAM - All Versions
  • Powershell Component Monitor

Cause

  • By default .NET apps run as 32 bit and they won't see the files in C:\Windows\System32, they'll see the files in C:\Windows\SysWOW64.

Resolution

  1. Change the template to x64 polling method:
  2. Edit the Application
  1. Expand Advanced, and in the Platform to run polling job on the field, change the value to x64
  2. ​​​​​​​​​​​​​​If you run the script again you shall see the application is now present.

C:\windows\system32\tabcal.exe 
C:\windows\system32\takeown.exe 
C:\windows\system32\TapiUnattend.exe 
C:\windows\system32\taskhostw.exe 
C:\windows\system32\taskkill.exe 
C:\windows\system32\tasklist.exe 
C:\windows\system32\Taskmgr.exe 
C:\windows\system32\tcmsetup.exe 
C:\windows\system32\TCPSVCS.EXE 
C:\windows\system32\tdlrecover.exe 
C:\windows\system32\telnet.exe 
C:\windows\system32\TFTP.EXE 
C:\windows\system32\ThumbnailExtractionHost.exe 
C:\windows\system32\TieringEngineService.exe 
C:\windows\system32\timeout.exe 
C:\windows\system32\TokenBrokerCookies.exe 
C:\windows\system32\TpmInit.exe 
C:\windows\system32\tpmvscmgr.exe 
C:\windows\system32\tpmvscmgrsvr.exe 
C:\windows\system32\tracerpt.exe 
C:\windows\system32\TRACERT.EXE 
C:\windows\system32\tscon.exe 
C:\windows\system32\tsdiscon.exe 
C:\windows\system32\tsecimp.exe 
C:\windows\system32\tskill.exe 
C:\windows\system32\TSTheme.exe 
C:\windows\system32\TSWbPrxy.exe
C:\windows\system32\typeperf.exe 
C:\windows\system32\tzsync.exe 
C:\windows\system32\tzutil.exe
 

   5. You shall now be able to submit the changes to the template and the script will execute the program as expected.

 

 
Last modified

Tags

Classifications

Public