• Has anyone used PSEXEC to run CMDKEY?

    Home » Forums » AskWoody support » Windows » Windows 7 » Questions: Windows 7 » Has anyone used PSEXEC to run CMDKEY?

    Author
    Topic
    #502086

    This is a rather long shot, but I am trying to apply CMDKEY to each of a number of Windows 7 Pro PCs in a workgroup by using PsExec in an Elevated/Run as Administrator BATch file run on an additional PC, using (on one line):

    [noparse]psexec \%pc% -h cmd /c CMDKEY /ADD:targetpc /USER:username /PASS:password[/noparse]

    and get the message:

    CMDKEY: Credentials cannot be saved from this logon session.

    I’ve tried a number of variations on the PSEXEC parameters:
    * using /l instead of /h
    * omitting these parameters entirely
    * omitting cmd /c
    but I get the same error message.

    Has anyone ever got this to work, or can someone tell me what’s wrong?
    If I run CMDKEY natively on any PC it works correctly!

    BATcher

    Plethora means a lot to me.

    Viewing 2 reply threads
    Author
    Replies
    • #1527381

      BATcher,

      I was able to get the command to run from my Win 8.1 Pro machine using an Elevated Command Prompt:
      41989-cmdkey
      It returned an error code of 0!

      Note: I had to pass the remote machine a user account & password that already existed on that machine to get it to work. Also some info blacked out for my protection. 😆

      However, going to the other machine (Win 7 HP) the account was not there! :confused: :angry:

      I could not get it to connect to my Win 10 Build 10532 machine even though I was logged on with a Local Account it insisted on requiring the credentials for the MS Account on the machine, very long PW so I didn’t try but I will if you want.

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1527461

      RG, you are an intergalactic superhero!

      There should have been no need to supply PsExec with a username and a password, because those on the target machine are the same as on the source machine.

      But when supplied, It Works – just as in your screenshot!

      Thanks!

      BATcher

      Plethora means a lot to me.

    • #1528580

      PSexec uses credentials on local connections only, thus the need to supply them on the network.

      cheers, Paul

    Viewing 2 reply threads
    Reply To: Reply #1528580 in Has anyone used PSEXEC to run CMDKEY?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel