Windows Server activation via KMS

Nothing is more fun that finding out a production server has not been activating via KMS like it was supposed to be doing.  Imagine my surprise logging in and seeing a “Windows is not activated” message.  Re-entering the correct kms setup didn’t solve it; in fact, it didn’t even send a KMS message to the server.

It turns out the server was in MAK licensing mode.  I found that out by running the command “slmgr /dlv” in an elevated command prompt and seeing VOLUME_MAK in the description.

Read more Windows Server activation via KMS

Chrome: app mode

If you want to open a chrome window without the tab bar and toolbars, you can start chrome in application mode:

Chrome.exe --app=

You can run this from the Run dialog (Windows-R) or create a shortcut.  I use this mode for both and Netflix.

SQL Server: database owner SID issue

If you restore a database on a different SQL Server you may see the following error message:

The database owner SID recorded in the master database 
differs from the database owner SID recorded in database...

The solution is to change the authorization on the database to a known SQL account:

alter authorization on database::{databasename} to {username}

Simply replace the {databasename} and {username} with the appropriate names; the brackets should not appear in the SQL query.

Installing .Net 3.5 on Win8 using DISM

To install the .NET Framework 3.5 from installation media located in the D:sourcessxs directory, use the following command:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\Sources\SxS


  • /Online targets the operating system you’re running (instead of an offline Windows image).
  • /Enable-Feature /FeatureName:NetFx3 specifies that you want to enable the .NET Framework 3.5.
  • /All enables all parent features of the .NET Framework 3.5.
  • /LimitAccess prevents DISM from contacting Windows Update.
  • /Source specifies the location of the files needed to restore the feature (in this example, the D:\Sources\SxS directory).

For more information about DISM parameters and options, see How to Enable or Disable Windows Features


Windows Explorer: open at Computer instead of Libraries

One of the changes in Windows 7 that really annoyed me (and continues to annoy me in Win8 RTM and Server 2012) is that the Windows Explorer insists on opening up in the libraries area instead of the computer (drives, etc) that was the previous default.

You can change that behavior by right-clicking on the Windows Explorer icon in the task bar and then right-click again on Windows Explorer (or File Explorer in Win8) and selecting Properties.

Replace the value listed in the Target field with the following string:

%windir%explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

This will force Explorer to open in the Computer area which is far more useful given the way I work.

Add/remove GUI in Windows Server 2012

In Windows Server 2012, Microsoft made it easy to add and remove the graphical user interface (GUI) using simple powershell commands.  Running a server without the overhead of the GUI (called Server Core) helps keeps the server more secure since less programs are running that could be exploited.  Running without a GUI should also help limit the number of reboots required every Patch Tuesday, but in truth I haven’t yet seen that many reductions in reboots on my Server Core systems.

To install the user interface, open powershell and type the following cmdlet:

Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Similarly, you can uninstall the user interface with the following cmdlet:

Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Of course, running these cmdlets will require a reboot to finish the configuration.

Patch Tuesday: problems with KB2840628

Microsoft generally does a pretty good job at testing patches before they are released, making Patch Tuesday pretty effortless (except for the persistent need to reboot servers — wish they’d adopt a method like Linux where we could just restart the affected service after the update is installed).

But this month was different.  I applied the July 2013 patches first to a development system and no issues were reported.  So a few days later I pushed them out to production only to find the .Net Framework was broken; every managed procedure/trigger failed with the infamous .Net “Object reference not found” error.

It took me a while to pin down the problem.  It was caused by MS13-052 (KB2840628).  Uninstalling that patch and rebooting fixed the errors.

Microsoft mentions the problem in a related document and they mention a workaround in scenario 2.