Question

So I've backed myself into a corner - I wanted an application or command to run when a user logged in over RDP to a server. As per a best-practice suggestion on a Microsoft site, I set up this program to run under group policy rules and now I have a dilemma:

I log into my server via RDP, the default program launches and then immediately logs me out without a chance for me to do anything.

How can I get into the box again to change this setting? Server is Windows 2008 r2 with terminal services installed on a remote IP.

Was it helpful?

Solution

Could you just remove\edit the GPO, wait a bit, and then reboot the server? You could still send it the "shutdown /m \computername". You could also use psexec to remotely run "gpupdate /force" before rebooting.

If you set that up as local group policy, then you can try opening mmc, choosing the Group Policy editor, and pointing it to that machine to edit the policies. In more detail:

  1. Start --> Run --> mmc
  2. File --> Add/Remove Snap-in
  3. Under the Standalone tab, click Add...
  4. Choose Group Policy Object Editor
  5. In the following wizard, click the Browse button
  6. Click the "Computers" tab, select the Another computer radial button, and type the name or Browse to the remote computer
  7. Click OK, then Finish, then Close, and finally OK

Also you could maybe edit/add a logon script that runs "shutdown -a" to abort logoff/shutdowns, but that may not work due to timing.

You didn't mention if this was Domain, or local, but those options should take care of either.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top