How to start process remotely with admin console

Welcome Forums General PowerShell Q&A How to start process remotely with admin console

This topic contains 5 replies, has 3 voices, and was last updated by

5 years, 5 months ago.

  • Author
  • #9493

    Points: 0
    Rank: Member

    Dear all,

    I have to start a process remotely with login as console like:
    mstsc /admin or /console, then "start myprogram.exe GP01"

    I have powershell V2, I tried with: invoke-command and
    invoke-wmimethod but same.
    Any one has any idea?

  • #9501

    Points: 1
    Rank: Member

    You need to share what you ran and what the results you received were in here in order for someone to be able to help you. Otherwise you're leaving us in the dark.

  • #9570

    Points: 0
    Rank: Member

    Good day everybody,

    Ok Posholic,

    I ran: invoke-command -computername server1 {start c:\myprocess GP1} nothing

    also invoke-wmimethod -path win32_process -name create -argumentlist {start c:\myprocess GP1}

    I got nothing with Returnvalue: 9

    Just I need to run this command on console session not any session created, like when I logon with: mstsc /console

    Also when I logon on this server with mstsc /admin, and I execute this with powershell:
    start c:\myprocess GP1

    It runs perfectly

    Just for reminder I have powershell V2.

    I know it weird but this program should start in console session and not in other session.

    Thanks for your help

  • #9571

    Points: 0
    Rank: Member

    As far as I know, this isn't possible with PowerShell remoting, but you might be able to make it work with PSExec, which you can download from Microsoft if you don't have it already. PSExec's "-i" argument with no session specified is supposed to make the command interact with the console session. I haven't tested this syntax, but the command would probably look something like this:

    psexec.exe \\server1 -i powershell.exe -Command start c:\myprocess GP1
  • #9572

    Points: 0
    Rank: Member

    Ok Dave thanks,

    I will try and revert back to you.

  • #9598

    Points: 0
    Rank: Member

    Hi Dave,

    I tried this from my workstation:

    psexec \\Myserver -i powershell -command start "E:\STARTUP\StartNStopFiles\SyncDB_recover" -WindowStyle minimized -ArgumentList GP01

    But it doesn't work, same as powershell, process is being executed but I don't see the windows in console screen.

    Thanks for your suggestion

The topic ‘How to start process remotely with admin console’ is closed to new replies.