List Processes

Microsoft.Windows.Server.10.0.Computer.ProcessList.Task (Task)

Query and display a list of currently running processes.

Element properties:

TargetMicrosoft.Windows.Server.10.0.Computer
AccessibilityPublic
CategoryMaintenance
EnabledTrue
RemotableFalse
Timeout300

Member Modules:

ID Module Type TypeId RunAs 
PA ProbeAction System.CommandExecuterProbe Default

Source Code:

<Task ID="Microsoft.Windows.Server.10.0.Computer.ProcessList.Task" Target="ServervNext!Microsoft.Windows.Server.10.0.Computer" Accessibility="Public">
<Category>Maintenance</Category>
<ProbeAction ID="PA" TypeID="System!System.CommandExecuterProbe">
<ApplicationName>%WINDIR%\System32\CMD.EXE</ApplicationName>
<WorkingDirectory/>
<CommandLine>/c $file/process.cmd$</CommandLine>
<TimeoutSeconds>30</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files>
<File>
<Name>process.cmd</Name>
<Contents><Script>

@echo off
if exist "%WINDIR%\System32\TASKLIST.EXE" (
%WINDIR%\System32\TASKLIST.EXE
goto end
)
if exist "%windir%\system32\WindowsPowerShell\v1.0\powershell.exe" (
"%windir%\system32\WindowsPowerShell\v1.0\powershell.exe" -Command Get-Process
goto end
)
:end

</Script></Contents>
<Unicode>false</Unicode>
</File>
</Files>
</ProbeAction>
</Task>