0

I need to execute a long running script (bat, powershell, whatever) on my server from an interactive RDP session and logoff the RDP session while the script keeps running.

How do I do ? A bonus would be to be able to reclaim the command line console when I login again.

Note: Simply closing the RDP session (without logoff) is not considered an acceptable solution in my case.

Serge Wautier
  • 419
  • 1
  • 5
  • 16
  • 1
    What have you tried? Did you try creating a service for running your script? – GChuf Aug 25 '20 at 11:11
  • 1
    I think disconnecting is the only solution provided by Microsoft. I don't believe there is any third party solution out there to get around this. I'm very curious as to why you consider it unacceptable. – Larryc Aug 25 '20 at 15:16
  • @GChuf, no not a service. Basically I'm looking for something along the lines of SSH+screen in Linux where I can simply disconnect my session and recover the screened process later. I tried to run as a different user to survice the end of the session but that doesn't work. – Serge Wautier Aug 28 '20 at 09:54
  • @Larryc, thanks for asking me about why simple disconnection is not acceptable: As I was writing it, I realized I mixed 2 problems that we have . One of them implies an internal IT policy about logging off each time but it's not my problem at hand. Hence yes, in this case I can simply disconnect the RDP session. The risk is that IT monitoring will close my disconnected session but I can live with it in absence of other 'supported' solution. – Serge Wautier Aug 28 '20 at 09:58

0 Answers0