?
Solved

PsExec command

Posted on 2013-11-12
1
Medium Priority
?
1,114 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 85

Accepted Solution

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
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…
Suggested Courses

764 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