Server 2012 RDS Certificate Solution

Everything I had read online pointed to having a Public SAN certificate or using a Self-Signed certificate and pushing it out via group policy. I could not find anything about using an Enterprise CA to delve out a certificate for RDS. This got me thinking about using a SAN certificate internally, but how?

On your Enterprise CA you can run the following commands to allow for SAN Certs
certutil -setreg policy\EditFlags +EDITF_ATTRIBUTESUBJECTALTNAME2
net stop certsvc
net start certsvc

Next lets open the Certificates Templates Console
Right-Click the Computer certificate and click “Duplicate Template”.

RDS-General

I just called this template RDS-Cert and set the Validity period to 4 Years.

RDS-Compatibility
Continue reading

Powershell version of Telnet

Below is a quick way to perform a telnet session on a server that is not allowed to have the telnet client for some reason(compliance).
## Create Socket Object
$Socket=New-ObjectNet.Sockets.TcpClient# Suppress error messages
$ErrorActionPreference=SilentlyContinue# Try to connect
$Socket.Connect(“192.168.1.5”,“443”)

if ($Socket.Connected)
{
write-host“Port 443 is open”$Socket.Close() ## Destroy the connection
}
else
{
write-host“Port 443 is not open”
}

Fast – Inactive AD Computers List

One of easiest ways to get a current list of all the inactive Computers in your AD is by using DSQuery. Below you will find two examples of how I use this. You will notice the “-limit 0”. This allows the query to pull back an unlimited amount of computers. At the end I am piping this out to a csv file.

Computer accounts not used in the last 6 months/26 weeks.
dsquery computer -inactive 26 -limit 0 > List_6_months.csv

Computer accounts not used in the last 2 months/8 weeks.
dsquery computer -inactive 8 -limit 0 > List_2_Months.csv

SCCM Console Fix for Administrators

If you receive the following error message when launching the SCCM Console, use the instructions below. You may also see errors in your SMSAdminUI.log file that resemble “The performance counter ‘# result objects in memory’ was not found”.

SCCMError

Go to Control Panel -> Programs and Features. Highlight “Microsoft System Center 2012 Configuration Manager Console” -> click uninstall.
Continue reading

Ping Last User GUI

PingLastUser

[
void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Drawing”)
[
void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)

## Some Variables To Use
$ComputerName=“”

## Main Window Size
$objForm=New-ObjectSystem.Windows.Forms.Form
$objForm.Text=“Ping Last User”
$objForm.Size=New-ObjectSystem.Drawing.Size(800,610)
$objForm.StartPosition=“CenterScreen”
$objForm.KeyPreview=$True

Continue reading