Remote Desktop Licencing

A bit of background, I sort of inhereted a mess of a remote desktop farm. We have licences purchased through SPLA but long story short, nobody bothered to apply them.


It was actually common practise to just reset the 120 RDP grace period when it ran out.. I know, obviously this needed doing properly.

I had never done this before so I won't bore with the details of attempting to figure out how SPLA worked and how I had to apply the CAL's to the 2012 licencing server I had built. It was a nightmare but I got there in the end.

The major problems begean when the RD licencing diagnoser persistantly told me licencing had not been configured, even though it clearly had. 

Turns out the server manager GUI wasn't setting values in the registry as it should have done, so with a bit of powershell magic and some fiddling in the registry I finally got it to work, here's what I did

Powershell:

$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj. SetSpecifiedLicenseServerList("CLIENT-SRV-LS01.MSAClient.LOCAL")

Registry Value:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Termanal Server\Licencing Core\LicencingMode 

Change the value to 2 for cal per device mode, 4 for cal per user mode.

And that's it!

Application to test SMTP settings

Lots of applications utilize email functionality, a few Windows desktop applications I support certainly do. Often I am asked to configure SMTP settings for these applications, to enable alerts and other stuff like that to be emailed directly from the application.


One massive problem I always seem to come across is the inability of people to provide correct settings or even test them before they are rolled up and thrown in my general direction to deal with.

My solution was to design a simple interface that will log exactly what is wrong with the settings there and then.

You can download the source here, or if you'd prefer you can get just the executable here.

 Feel free to use or modify it however you like.

It's written purely in C#.