Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PsExec usage

Posted on 2013-06-23
4
Medium Priority
?
1,078 Views
Last Modified: 2013-06-25
Hi All,

I want to use PsExec to remotely manage services. But while doing so, I found this issue: PsExec failing
How do I pass on yes/no etc through this?
0
Comment
Question by:bubaibhatta
4 Comments
 
LVL 6

Assisted Solution

by:Vijay Pratap Singh
Vijay Pratap Singh earned 0 total points
ID: 39270393
The following is from http://blogs.technet.com/b/systemcenteressentials/archive/2009/09/01/using-psexec-to-open-a-remote-command-window.aspx

With psExec installed you can open a remote command prompt by calling it as follows:

psExec \\computer cmd

If you have psExec installed on your computer with the Essentials console you can create a task in Essentials to open a remote command window from within Essentials.

To create this task:

    Go to the Authoring workspace
    In the navigation pane on the left hand side, expand Management Pack Objects and select Tasks
    From the Tasks pane, select Create a New Task
    Select Command Line from the Console Tasks folder and click Next
    In the Task Name field, type "Remote Command Window"
    In the Description type "Use the SysInternals PsExec tool to open a remote command window for the selected computer. PsExec must be installed on the computer with the Essentials console."
    In the Task Target, click Select and then choose Windows Computer and click OK
    Click Next
    In the Application field, type the full path the psexec.exe on the Essentials console (e.g. C:\pstools\psexec.exe). If you have the console on multiple computers you will need psExec installed in the same location on each of them.
    Enter \\ then Click the arrow at the end of the Parameters field and select Net BIOS Computer Name, then add a space and enter cmd
    Uncheck the Display output when this task is run box
    Click Create
(Edit - Attribution added - Modulus_Twelve)
0
 
LVL 85

Accepted Solution

by:
oBdA earned 1400 total points
ID: 39270409
You can either add "/y" to your command line, which will stop all dependent services without confirmation:
net stop IMAService /y

Open in new window

or stop the dependent services before you stop the IMA service
net stop "Citrix WMI Service"
net stop "Citrix SMA Service"
net stop "IMAService"

Open in new window

The latter is the better solution if you want to retain control over the order in which the services are stopped (which, in this case, doesn't really matter).
0
 

Author Comment

by:bubaibhatta
ID: 39270524
Thanks for the quick reply. It solved my problem..
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

926 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