Windows 10: Psexec with cmd parameters?

Discus and support Psexec with cmd parameters? in Windows 10 Network and Sharing to solve the problem; Hi All, I am trying to run a command on a remote computer using psexec, and I can get it to run fine by just calling the .exe, but I also need to have... Discussion in 'Windows 10 Network and Sharing' started by AJ Hawkes ahawkes, Nov 24, 2020.

  1. Psexec with cmd parameters?


    Hi All,

    I am trying to run a command on a remote computer using psexec, and I can get it to run fine by just calling the .exe, but I also need to have 2 parameters included in the command, but I can't get it to work. Here is my example:


    I can run this fine:

    psexec.exe -i 1 -s -d \\computername "C:\Program Files x86\Citrix\ICA Client\SelfServicePlugin\CleanUp.exe"


    I need to add these 2 parameters:

    /silent -cleanUser


    I have tried a few different ways, having parameters inside and outside of the quotes, but cannot get it to run successfully on the remote computer.

    examples I have tried but don't work:

    psexec.exe -i 1 -s -d \\computername "C:\Program Files x86\Citrix\ICA Client\SelfServicePlugin\CleanUp.exe" /silent -cleanUser
    psexec.exe -i 1 -s -d \\computername "C:\Program Files x86\Citrix\ICA Client\SelfServicePlugin\CleanUp.exe /silent -cleanUser"


    If I don't include the parameters, it just brings up the Citrix Receiver reset window on the remote computer and I would have to rely on a user to click ok. Does anyone have any advice on how I can run this command with the parameters included? I need to run the full command to reset Citrix Receiver silently on remote computers.


    Thank you in advance!

    AJ

    :)
     
    AJ Hawkes ahawkes, Nov 24, 2020
    #1
  2. pktpusher Win User

    PSexec

    I know you can use PSExec to say for instance shutdown or delete a file on a remote computer's desktop of a user on the domain.

    psexec64 \\<Computer-Name> cmd /c del c:\Users\user\Desktop\testtext.txt

    psexec64 \\<Computer-Name> cmd /c shutdown /h /r 0

    Is there a way to remotely initiate a application to open for a user REMOTELY with this command in cmd?

    (Does not work!!! Leaves cmd hanging no way to kill command)

    *** psexec64 \\<Computer-Name> cmd /c c:\windows\system32\msra.exe ***

    (Does not work!!! Leaves cmd hanging no way to kill command)

    Any ideas or suggestions are welcome! Thanks
     
    pktpusher, Nov 24, 2020
    #2
  3. ryanly Win User
    GPU-Z what command line parameter ?

    Current /? (-?) or / help (-help) parameter is invalid
     
    ryanly, Nov 24, 2020
    #3
  4. Psexec with cmd parameters?

    PsExec launch throws Access Denied Error

    Hi,



    Thank you for writing to Microsoft Community Forums.



    We understand your concern as you are having issues while running PsExec.



    Let me point you in the right direction, where you would get the appropriate help for this issue. I would suggest you to post your query in
    TechNet forums, where we have experts and support
    professionals who are well equipped with the knowledge on PsTools & PsExec to assist you with the appropriate troubleshooting steps.



    However, you can also refer these article for additional information:

    PsTools

    PsExec v2.2



    Aditya Roy

    Microsoft Community – Moderator
     
    Aditya_Roy, Nov 24, 2020
    #4
Thema:

Psexec with cmd parameters?

Loading...
  1. Psexec with cmd parameters? - Similar Threads - Psexec cmd parameters

  2. Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter

    in Windows 10 Software and Apps
    Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter: Trying to remotely restart a windows computer with powershell and Restart-Computer command. Powershell is running from a docker container with mcr.microsoft.com/powershell image, and from within the docker container i am running a powerhell script. The script is also tested...
  3. Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter

    in Windows 10 Gaming
    Powershell docker image, Restart-Computer cmd missing 'ComputerName' parameter: Trying to remotely restart a windows computer with powershell and Restart-Computer command. Powershell is running from a docker container with mcr.microsoft.com/powershell image, and from within the docker container i am running a powerhell script. The script is also tested...
  4. Powershell with CMD/c to run external command with Parameters

    in Windows 10 Customization
    Powershell with CMD/c to run external command with Parameters: Greeting, I have an old command line application call Commandline.exe. it run with a parameter to check then show the result. but it need extra "Enter" to confirm like: commandline.exe -s 4567890 So I preparing the an answer file which is on an "Enter" crlf...
  5. CMD wmic parameter?

    in Windows 10 Network and Sharing
    CMD wmic parameter?: Good morning, I'm practicing again and I'm facing another problem which I can't solve despite Google. I want to use the "wmic volume get Driveletter" to read the drive letter of a drive named:"test". But I can't get it to set the parameters so that only the drive:test is...
  6. PSexec

    in AntiVirus, Firewalls and System Security
    PSexec: I know you can use PSExec to say for instance shutdown or delete a file on a remote computer's desktop of a user on the domain. psexec64 \\<Computer-Name> cmd /c del c:\Users\user\Desktop\testtext.txt psexec64 \\<Computer-Name> cmd /c shutdown /h /r 0 Is there a way...
  7. PsExec launch throws Access Denied Error

    in AntiVirus, Firewalls and System Security
    PsExec launch throws Access Denied Error: Hi, While running PsExec.exe in a Windows 10 64 bit system, throws "Access Denied" error Where as PsExec64.exe launches fine. Event logs shows the following error, Activation context generation failed for "D:\2019\PsExec.exe".Error in manifest or policy file...
  8. parameter

    in Windows 10 Software and Apps
    parameter: why does it say parameter incorrect when i hit print? https://answers.microsoft.com/en-us/windows/forum/all/parameter/1b2e6b2c-6b11-46ef-a22b-ce015fe41dc3
  9. Psexec

    in Windows 10 Software and Apps
    Psexec: Anyone had luck installing psexec on Win10? Having trouble. Not sure if they environmental variables are correct. 105767
  10. Psexec syntax and problem with programs

    in Windows 10 Support
    Psexec syntax and problem with programs: Hi, can you please give me an advice about using PSEXEC on Windows 10? I would like to run/start program with GUI on remote computer, but its not working. I Can run program with PID, which i can see in task manager, but no GUI is showing on monitor, unforutnately. Down...