Solved

PsExec usage

Posted on 2013-06-23
4
1,031 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 84

Accepted Solution

by:
oBdA earned 350 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

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…
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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