Display Server Statistics

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

Display a list of all the network statistics for the Server service of the server.

Element properties:

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

Member Modules:

ID Module Type TypeId RunAs 
PA ProbeAction Microsoft.Windows.PowerShellProbe System.PrivilegedMonitoringAccount

Source Code:

<Task ID="Microsoft.Windows.Server.10.0.Computer.NetStatisticsServer.Task" Target="ServervNext!Microsoft.Windows.Server.10.0.Computer" Accessibility="Public">
<Category>Maintenance</Category>
<ProbeAction ID="PA" TypeID="Windows!Microsoft.Windows.PowerShellProbe" RunAs="System!System.PrivilegedMonitoringAccount">
<ScriptName>Microsoft.Windows.Server.10.0.Computer.NetStatisticsServer.Task.ps1</ScriptName>
<ScriptBody><Script>

param ()
$SCRIPT_NAME = "NetStatisticsServer"
try
{
$ErrorActionPreference = "Stop"
$Error.Clear()
net.exe statistics server
}
catch{
if($Error[0].Exception.Message.Contains("The syntax of this command is"))
{ "Task is not supported on this OS" }
else
{ $Error[0].Exception.Message }
$Error.Clear()
}

</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</ProbeAction>
</Task>