View status of service running on remote machine

Posted by tunwn on Stack Overflow See other posts from Stack Overflow or by tunwn
Published on 2010-04-05T16:31:50Z Indexed on 2010/04/05 18:13 UTC
Read the original article Hit count: 321

Filed under:
|

The conditions are - I don't have administrator privilege - I want to see the status of a service in remote machine (server)

I use the following code (vb.net with framework 2.0) to see the status

Dim sqlSvc As ServiceController
Svc = New ServiceController(My.Settings.serviceName, My.Settings.machineName)
If sqlSvc.Status.ToString.Equals("Running") Then
    displayStatus("success", sqlSvc.Status.ToString)
Else
    displayStatus("error", sqlSvc.Status.ToString)
End If

When running the code, InvalidOperationException is raised and found out that I need admin right in the server.

Can I lookup the status of the service without having admin right in remote machine ?

© Stack Overflow or respective owner

Related posts about servicecontroller

Related posts about vb.net