TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kunal Pandya
NA
3
0
ServiceController[] to access multiple machines
May 28 2009 5:40 PM
Hi Guys,
I'm after some assistance / guidance, I am trying to create an application to control windows services i.e stop / start across multiple servers simultaneously. There is probably more then 200 services across 20 servers.
I came across the System.ServiceProcess.ServiceController class and want to be able to pass multiple machines to the GetServices() method but can only pass one machine.
i.e
while
(dataset.read())
{
string ipaddress = dataset["ipaddress"].ToString()
ServiceController.GetServices(ipaddress);
foreach(ServiceController services in ipaddress);
{
services.Stop();
}
}
Is there any way around this or alternatively another class method to be able to do this?
The machines ip's and the services on the machine are from a SQL query dataset that I need to pass.
Not sure how else to access Windows services?
Thanks in advance
Reply
Answers (
2
)
help for run length encoding
How to monitor USB port in VC#