none
How to logon using PowerShell? RRS feed

  • Question

  • I would like to know on how to use PowerShell to Logon window user.

    Does anyone have any suggestions?
    Thanks in advance for any suggestions

    Thanks in advance for any suggestions

    • Moved by Bill_Stewart Wednesday, May 30, 2018 6:34 PM Unanswerable drive-by question
    Monday, April 16, 2018 12:03 PM

All replies

  • You cannot use a script to logon a user.  You can run a script as a user.


    \_(ツ)_/

    • Proposed as answer by I.T Delinquent Monday, April 16, 2018 12:59 PM
    Monday, April 16, 2018 12:53 PM

  • I need to run program A under username "A" account and run program B under username "B" account separately at the same moment. After restarting window, the default username "A" account would be logon, but I need to manually logon username "B" account whenever window is restarted. Would it be possible to use PowerShell to logon account "B" under this situation? furthermore, could you please describe more on what is to "run a script as a user"?

    Do you have any suggestions?

    Thank you very much for any suggestions (^v^)


    Thanks in advance for any suggestions

    Monday, April 16, 2018 1:23 PM
  • I repeat.  You cannot "logon any user using PowerShell.

    You can use "runas" to runa script.

    runas /?

    help Invoke-Command -Full


    \_(ツ)_/

    Monday, April 16, 2018 1:29 PM
  • Thank you very much for suggestions (^v^)

    Thanks in advance for any suggestions

    Monday, April 16, 2018 2:14 PM