Take screenshot from server screen while disconnected from RDP

I have a rather specialized application that HAS to work in a certain way. It works as a client application on a server. That means I have to be logged on for it to run. At the same time, I cannot keep an RDP connection open at all times, so I have to disconnect after a while.

The application runs fine while I'm disconnected (I only disconnect, I do not log off). However, part of what the application does is that it takes a screenshot of the server. The screenshot comes out fine while I'm logged on, but once I disconnect it comes out black.

Is there some setting in Windows I can change to allow it to take screenshots while I'm disconnected?

Please note: I cannot change the software or the circumstances, only Windows settings.

Update: I actually have a solution, I just don't want to use it because it entails security risks. Using the command "control userpasswords2" I can allow a certain user to be logged on automatically when the server starts. This works well, but it is amazingly insecure so I am hoping not to have to resort to this.


RDP sessions have a black screensaver. If you take a screenshot while a screensaver is up, that is all you will see. Disable the screensaver, so it doesn't come up on the disconnected sessions.

In gpedit.msc: User Configuration -> Administrative Templates -> Control Panel -> Display

Edit: apparently this screensaver only applies if the session is still connected. @TheCleaner is right disconnected session aren't drawn.

From this old answer about rdp console: How to keep user logged-in when disconnecting from RDP session

You can redirect a logged in session to console. It will stay active, but you'll need to redirect it back to rdp when you want to reconnect. Just tried this and it showed the 'console' session as active even when rdp was disconnected.

To redirect to console:

tscon <session#> /dest:console

Then when you want to reconnect to it:

tscon <session#> /dest:<rdp-tcp#>

Initially:

  • Login via rdp initially to create the session and start the application.

  • Redirect the session # to console. Let it run for intended duration.

To reconnect:

  • Login via rdp to create a new session

  • Redirect the console session to the new rdp session