OK, so I'm just stupid today (altho today isn't really any different than
any other day ..)
I want to run "klist -li 0x3e7 purge" on one of my servers, and I want to
do it remotely. So I tried to fire up PSEXEC to do it, and I'm passing the
arguments wrong, somehow.
C:\SysinternalsSuite>psexec \\dctrweb026 c:\windows\system32\klist "-li
0x3e7 purge"
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - 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.
So what did I do wrong on the PSEXEC invocation? I gave it the machine to
run on; the full path to the command I want executed; and the arguments for
that command. That's what the help says to do.
I obviously have rights to do it, but I'm not sending the parameters to
klist correctly.
It's got to be something simple, and I'll feel like a moron, once somebody
points it out to me. But that won't be the first time ..
Clues, anyone?
(target is Win2012 R2, if it matters)