Try killing the quotes entirely.
--
There are 10 kinds of people in the world...
those who understand binary and those who don't.
From: [email protected] [mailto:[email protected]] On
Behalf Of Michael Leone
Sent: Tuesday, July 18, 2017 9:29 AM
To: [email protected]
Subject: Re: [NTSysADM] Running a command with parameters using PSEXEC
On Tue, Jul 18, 2017 at 9:13 AM, David McSpadden
<[email protected]<mailto:[email protected]>> wrote:
I would move the first quote to in front of the c:\windows and maybe add user
permissions to the remote box in the command line.
No joy. Different error, tho ...
C:\SysinternalsSuite>psexec \\dctrweb026<file://dctrweb026> -u XXXXXX -p XXXXXX
"c:\windows\system32\klist" "-li 0x3e7 purge"
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com<http://www.sysinternals.com>
Usage: klist.exe [command]
Command list:
[tickets] [-lh <LogonId.HighPart>] [-li <LogonId.LowPart>]
tgt [-lh <LogonId.HighPart>] [-li <LogonId.LowPart>]
purge [-lh <LogonId.HighPart>] [-li <LogonId.LowPart>]
sessions [-lh <LogonId.HighPart>] [-li <LogonId.LowPart>]
kcd_cache [-lh <LogonId.HighPart>] [-li <LogonId.LowPart>]
get <SPN> [-lh <LogonId.HighPart>] [-li <LogonId.LowPart>]
[-kdcoptions <options>]
add_bind <DOMAIN> <DC>
query_bind
purge_bind
c:\windows\system32\klist exited on dctrweb026 with error code -1.