?
Solved

How to restart Windows Service remotely

Posted on 2007-03-22
8
Medium Priority
?
607 Views
Last Modified: 2009-12-16
Can any body please help me. I want to restart Windows service on Windows 2003 Standard Server remotely from a Windows XP Pro Machine without using Remote Desktop etc. That XP Pro and Server are on the same network.
0
Comment
Question by:safeerhshah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18770282
Start->Run->Compmgmt.msc

Right-click Computer Management (Local) and choose "Connect to another computer"

Once connected, click Services and Applications, Services - locate your service, right-click it and click Restart
0
 

Author Comment

by:safeerhshah
ID: 18770314
Thanks for your advise but I want to create a shortcut (a batchfile etc)  on a users desktop so whenever he want by just running that shortcut he wouldl be able to   restart that service.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18770319
Get a copy of psexec http://www.microsoft.com/technet/sysinternals/utilities/psexec.mspx

In your batch file,

@psexec \\servername net stop servicename && net start servicename
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 18770350
0
 
LVL 12

Accepted Solution

by:
StuFox100 earned 450 total points
ID: 18770392
Sirbounty write track - but I would use psservice
http://www.microsoft.com/technet/sysinternals/utilities/psservice.mspx
"psservice \\servername restart servicename"
- There are also options to run it a different user.
Cheers
Stu
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18770407
Actually, with 2003, leew has the better solution...

sc.exe is a native service control tool...

sc <server> stop <servicename>
sc <server> start <servicename>

should do it for you...
0
 
LVL 1

Expert Comment

by:pmartin524
ID: 18770448
Whatever command you use, remember that you need to be in the Administrators group on the server, whether by virtue of being a domain admin or otherwise.  If you don't login with the local admin account, but use a shared account.  Do the following:

Delete any existing connections to the server.  Find these connections with net use.
Connect to any share on the server with the administrator credentials.  

compmgmt.msc (open with mmc) is an easy gui that you can use to restart services and it's built in
0
 

Author Comment

by:safeerhshah
ID: 18770509
Thanks all of you I tried psservice and it worked according to my requrement.  

I would like to share more detail with you thay why i want to restart service. Actually we are using Unimessaging Phone system. (Tennyson SOX). Recently I upgrade our whole network structure and since that day  AA Services (Auto Attendant Services) start crashing. Unfortunaly Tennyson was closed in year 2003 so I dont have any proper support. I send some log files of that software to the company who providing support to remaining SOX customers but they didn't find any solution.  

In windows event viewer I am getting follwoing erro message.

Event Type:      Error
Event Source:      Service Control Manager
Event Category:      None
Event ID:      7032
Date:            22/03/2007
Time:            11:34:28
User:            N/A
Computer:      SOX
Description:
The Service Control Manager tried to take a corrective action (Restart the service) after the unexpected termination of the SOX Automated Attendant service, but this action failed with the following error:
An instance of the service is already running.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


So when ever we found that AA services are crashed we have to restart those services on that server. To facilitate users I created above batch file so they could restart service when ever it crashed.

I will deeply appreciate if you could guide me that how can I find more detail that why this service is crashing and also when ever it crashed our server send a email to users so they could restart service using above batch file.

Thanks,
0

Featured Post

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring Remote Assistance for use with SCCM
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question