Solved

How to restart Windows Service remotely

Posted on 2007-03-22
8
599 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18770350
0
 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

785 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