Solved

PsExec command

Posted on 2013-11-12
1
1,084 Views
Last Modified: 2013-11-12
I have a network shared folder on Server1 on which I have placed SP1 for Win7 (windows6.1-KB976932-X64.exe) and batch File SP1.bat
SP1.bat  -  robocopy "\\30SWL-Server-02\SP1\windows6.1-KB976932-X64.exe" "C:\Temp"

On my Windows 7 PC,I have created pclist.txt file and placed it in the root of C (C:)
pclist.txt has name of computer (later I wanted to add PC names to it as needed)

I have user account which is a member of Domain Admin group

I opened cmd under that account and typed following command:

psexec @C:\pclist.txt –u domainname\username –p Password "\\30SWL-Server-02\SP1\SP1.bat"

The result in cmd:

C:\Windows\system32>psexec @C:\pclist.txt -u domainname\username -p Password "\\30SWL-GHOST-02\SP1\SP1.bat"

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

\\PCNAME:

PsExec could not start ?u on PCNAME:
The system cannot find the file specified.
0
Comment
Question by:vadimmikhal
[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
1 Comment
 
LVL 84

Accepted Solution

by:
oBdA earned 500 total points
ID: 39641672
I suspect that you created the batch file not in a plain editor like Notepad, but in a word processor that replaced the "-" with a dash or something else.
Open the file in Notepad, and make sure that every "-" is actually a minus sign.
While you're at it, make sure that all quote signs you use are real double quotes as well, not "pretty" ones.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
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…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

730 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