Solved

How to restart Windows Service remotely

Posted on 2007-03-22
8
605 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 96

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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Configuring Remote Assistance for use with SCCM
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
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…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

687 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