Solved

How to restart Windows Service remotely

Posted on 2007-03-22
8
597 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
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
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18770350
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 12

Accepted Solution

by:
StuFox100 earned 150 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now