Archive for the ‘Windows Servers Tricks’ Category

How to manage terminal services sessions remotely?

Have you ever had to remote into a server to check the Windows server settings or local group policies setting that can’t be done through SQL Server Management Studio (SSMS), but unable to log in as the server had exceed the maximum number of 2 sessions? Frustrating isn’t it? It will make you even more furious if you knew one of your colleagues had forgotten to log off as he was in a hurry to head home to watch Monday Night Football or run off for a midday hour break for Krispy Kreme doughnuts.

No need to get angry my friends as that will add more stress to our lives and turn us into grumpy DBAs. There’s hope and solution for this issue after all. QWINSTA and RWINSTA to the rescue and their definitions are as follows:

  • QWINSTA: Query WINdows STAtion
  • RWINSTA: Reset WINdows STAtion

Without further talking like a politician and providing no practical solutions, here’s how you can use them:

  1. Run the command: QWINSTA /server:xxx.xxx.xxx. Where xxx.xxx.xxx is the ip address you wish to RDP into. You can also key in the server name instead.
  2. Look for the USERNAME, ID, and STATE columns. Mark the ID for the connection your wish to reset (kill). Usually, it is the one with the STATE of disconnected (Disc). If you must reset one that’s active, you should pick up the phone and call that individual. Be careful not to reset your boss’s connection!
  3. To kill the session that you had identified, run the command RWINSTA ID /Server:xxx.xxx.xxx. Where xxx.xxx.xxx is the ip address of the server and ID is the session ID you wish to reset.

QWINSTA and RWINSTA

Enabling Network Level Authentication on XP Machine for Terminal Access

Great news to my Windows XP friends, if you are trying to connect to Windows Server 2008 or Windows Server 2008 R2 and you have been receiving the annoying message:

“The remote computer requires Network Level Authentication, which your computer does not support”

RDP Disconnected

There’s help and hope and here’s the solution from Aaron Thirling at http://mysupportportal.net/Cultrix/Knowledgebase/Article/View/37/0/enabling-network-level-authentication-on-xp-machine-for-terminal-access:

Configure Network Level Authentication

To enable NLA in XP machines; first install XP SP3, then edit the registry settings on the XP client machine to allow NLA

  1. Click Start, click Run, type regedit, and then press ENTER.
  2. In the navigation pane, locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. In the details pane, right-click Security Packages, and then click Modify.
  4. In the Value data box, type tspkg. Leave any data that is specific to other SSPs, and then click OK.
  5. In the navigation pane, locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders
  6. In the details pane, right-click SecurityProviders, and then click Modify.
  7. In the Value data box, type credssp.dll. Leave any data that is specific to other SSPs, and then click OK.
  8. Exit Registry Editor.
  9. Restart the computer.

I hope this will help save you hours of frustration like I did trying all other solutions posted online.