Connect to a Server and Check Services Using WMI


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ServiceController sc = new ServiceController("MSSQLSERVER", serverName);
  2. string sqlStatus = sc.Status.ToString();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.