OMG, MSDTC Ran Out of Memory!

Symptom

I opened Component Services and browsed to Computers and My Computer. When I right-click My Computer and click the MSDTC tab I run into an out of memory error message.

Resolution

This is because the registry on your server is pointing to a default DTC that no longer exists. To resolve this problem you need to update the registry with the GUID of the new DTC. To do this follow these steps:

  • Open Services.msc and locate your DTC
  • Notice that when you open the services properties you will see the GUID of your DTC in the Path to Executable field
    • Document or copy this GUID

DTC_Service

 

 

 

 

 

 

 

 

 

 

  • Now open regedit
  • Browse to HKLM\Cluster\ResourceTypes\Distributed Transaction Coordinator
    • Backup this key
  • Edit the Cluster Default Resource property and paste in the GUID you copied from the previous step

DTC_Registry

 

 

 

  • Now attempt to access the MSDTC tab and verify the out of memory error message disappears and that your DTC is now listed under Default DTC.

 

Setting RDS/TS Licensing Server via WMI results in “Invalid Operation”

coollogo_com-79311929Background Info

So I was chugging right along, I issued a command like the one below and then all of a sudden I received an “Invalid Operation” error. What should I try to resolve this error?

$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList(“licensingserver”)

SetSpecifiedLicenseServerList

 

  1. Ensure that your account is a local admin on the server
  2. Ensure that you are launching Powershell as an administrator
  3. Ensure that Group Policy is not preventing you from making this change
    1. Browse to Computer Configuration -> Administrative Templates, Windows Templates, Terminal Services

Note: This “invalid operation” error can also appear when using the RemoveLSFromSpecifiedLicenseServerList and EmptySpecifiedLicenseServerList methods.

Sources

http://www.blackforce.co.uk/2014/02/17/2012-rds-server-the-remote-desktop-session-host-server-does-not-have-a-remote-desktop-license-server-specified
https://msdn.microsoft.com/en-us/library/windows/desktop/ff955672(v=vs.85).aspx

Enable Fancy Permalinks in WordPress on IIS

WordPress_LogoInfo

The majority of self-hosted WordPress installations use Apache as opposed to IIS. Therefore, when it came time to change the permalinks for NervousAdmin.com it was a little trickier. That combined with the lack of documentation turned a rather simple process into a few hours of troubleshooting. The guide below is intended to streamline this process for anyone in the future.

Steps

  • Ensure that URL Re-Write is installed in IIS
    • This can be checked via the IIS Administration console, there should be an icon for URL Re-Write as seen here.
  • Browse to the root directory where WordPress is installed
    • This folder should contain files such as wp-config.php and wp-settings.php
  • Create/edit the web.config file
    • If creating the web.config file ensure it is created with UTF-8 encoding. Notepa++ is great for easily identifying the encoding for a text file.

Read More

Gain Administrative Access to a SQL Instance

security-policies-icon

Info

If a user requires administrative access to a SQL instance they can easily gain administrative access as long as the following is true:

  • The user is an administrator on the Windows Server that host the SQL instance
  • SQL Server Management Studio is installed on the Windows Server
  • PSExec can be copied to the Windows Server

Steps

  • Download PSExec and copy it locally to the SQL Server
  • Login to the SQL server with an administrative account
  • Find the installation location of SQL Management Studio
    • Typically somewhere under C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
    • The name of the .exe is SSMS.exe

Read More

Generate a CSR in Windows

Background

In some situations it may be necessary to create a Certificate-Signing Request within Windows. There are many different ways to create a CSR within Windows but the tool outlined on this page is bundled with Windows and doesn’t require any additional software.

Steps

  • Open notepad
  • Paste in the contents below and save as certificate-request.inf
  • Replace CountryCode, CompanyName and domain.com with the correct information

Read More

Configure SSL on a SQL Failover Cluster

Pre-Requisites

  • Have an SSL cert where the Common Name (CN) of the cert matches the name of the SQL instance that needs to have SSL enabled. A wildcard cert will also work.
  • Ability to modify the registry on each of the cluster nodes

Step 1 of 2 (Import the Certificate into Windows)

  • Hold down the Windows key and push R to open a run window
  • Type mmc.exe and hit enter
  • Click the File menu and select Add/Remove Snap-in…
  • Select Certificates from the left column and click Add >
  • Select Computer Account and click Next when prompted

Screenshot1

  • Click Finish
  • Click Ok

Read More