Solved

PsExec command

Posted on 2013-11-12
1
1,075 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
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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.
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…

766 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