Query Server Service Status

Microsoft.Windows.FileServices.SMB.10.0.ServerQuery (Task)

Queries the Server service status by running the "sc query lanmanserver" command to determine whether the service is running.

Element properties:

TargetMicrosoft.Windows.FileServices.Service.SMB.10.0
AccessibilityPublic
CategoryOperations
EnabledTrue
RemotableFalse
Timeout300

Member Modules:

ID Module Type TypeId RunAs 
PA ProbeAction System.CommandExecuterProbe Default

Source Code:

<Task ID="Microsoft.Windows.FileServices.SMB.10.0.ServerQuery" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.FileServices.Service.SMB.10.0" Timeout="300" Remotable="true">
<Category>Operations</Category>
<ProbeAction ID="PA" TypeID="System!System.CommandExecuterProbe">
<ApplicationName>%SystemRoot%\System32\sc.exe</ApplicationName>
<WorkingDirectory/>
<CommandLine>\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$ query lanmanserver</CommandLine>
<TimeoutSeconds>30</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
</ProbeAction>
</Task>