Demander l'état du service Serveur

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

Envoie une requête à l'état du service Serveur en exécutant la commande "sc query lanmanserver" afin de déterminer si le service est en cours d'exécution.

Element properties:

TargetMicrosoft.Windows.FileServices.Service.SMB.6.3
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.6.3.ServerQuery" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.FileServices.Service.SMB.6.3" 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>