none
psexec RRS feed

  • Question

  • My LAN has 5 Windows Server 2019 platforms. From all but one "PSExec \\platform cmd.exe" runs as expected. One platform either returns "Object already exists" (with logged on administrator account) or "access is denied" if using another account.

    The delinquent platform happily accepts incoming PSExec request, though!

    Any clues?

    Thnx in advance . . .

    Bart Vermeulen


    LMV

    Saturday, August 8, 2020 1:54 PM

All replies

  • Psexec creates a PSEXESVC service so a non admin account will get an access denied unless you use the -u and -p switches to provide alternate credentials. 

    Run "sc \\platform qc PSEXESVC" to verify that the account you are logged in as has admin rights on the remote system and to see if the service is already defined. Log on to a "good" server and test the other 4. Then log on to the delinquent server and test the others. 

    Psexec deletes the service when it exits so maybe something got hung up. If you find the service, just delete it.

    sc \\servername stop PSEXESVC
    sc \\servername delete PSEXESVC 

    You might want to consider using Powershell's Invoke-Command instead of psexec.

    Saturday, August 8, 2020 2:42 PM
  • Also consider that just to avoid this cases where the service is still loaded, you can specify the -r parameter with a random generated name, so it will always load..

    -r         Specifies the name of the remote service to create or interact.
                    with.

    HTH
    -mario

    Sunday, August 9, 2020 9:09 AM