Solved

How to restart Windows Service remotely

Posted on 2007-03-22
8
596 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

743 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

15 Experts available now in Live!

Get 1:1 Help Now