Task that can determine the status of a specified service on a target server.
Namespace: MSBuild.Community.Tasks
Assembly: MSBuild.Community.Tasks (in MSBuild.Community.Tasks.dll)
Syntax
Example
Check status of SQL Server
Copy Code | |
---|---|
<ServiceQuery ServiceName="MSSQLServer"> <Output TaskParameter="Status" PropertyName="ResultStatus" /> </ServiceQuery> <Message Text="MSSQLServer Service Status: $(ResultStatus)"/> |
Inheritance Hierarchy
System.Object
Microsoft.Build.Utilities.Task
MSBuild.Community.Tasks.ServiceQuery
MSBuild.Community.Tasks.ServiceController
Microsoft.Build.Utilities.Task
MSBuild.Community.Tasks.ServiceQuery
MSBuild.Community.Tasks.ServiceController
Thread Safety
Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
See Also
Documentation version 1.0.0.0.