Activating Windows 8.1 clients on a KMS Host running Windows Server 2008 R2

I was recently helping out a friend who had a KMS server activating their Windows 7 machines but when they started moving their fleet to Windows 8.1 they saw they couldn’t install the KMS Host product key for Windows 8.1 recieving the following error:

0xc004f015: The Software Licensing Service reported that the license is not installed. 
SL_E_PRODUCT_SKU_NOT_INSTALLED

To allow Server 2008 R2 to activate newer versions of windows you need to install KB 2885698. The update adds support for Windows 8.1 and Windows Server 2012 R2 clients to Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, and Windows Server 2012 KMS hosts (see Windows Server 2012 R2 & Windows 8.1 KMS Service Activation).

Once you install the update you will need to restart the server (so do it out of hours if it’s on a DC or something critical). Once you’re back up and running, you simply need to issue the install product key command with your new KMS Host key.

slmgr.vbs /ipk YOUR-PROD-UCTK-EYHE-RE33

And your clients will begin activating once you hit the 25 client minimum. The key will continue to activate lower versions of Windows and if you install a Server key, it will do both Server and Client editions.

How to Rename a SharePoint 2013 Content database name hosted on SQL Server

Dismounting and Renaming a SharePoint DatabaseSo I’ve been toying with SharePoint 2013 in my lab at home, doing the install and configuration at the moment, setting up my first Site after the initial configuration but noticed that I made a typo in the Database name.  So how do I go about fixing or renaming that database in SharePoint and in SQL Server.

First thing first is we need to know the name of the Content database, in my case it is easy, because we only have one and I can easily see the spelling mistake I made. But if you need to work out the name of the Database, you can look in Application Management > Manage Content Databases and click on the Site Collection you are after; alternatively you can use SharePoint’s management shell and issue the following two cmdlet’s;

Get-SPWebApplication | Select-Object Url, ContentDatabases | Format-List

What sites are using this content database;

Get-SPContentDatabase | Where-Object {$_.Name -eq "SharePint_ContosoContent"} | Select-Object Sites | Format-List

So now we know the name of our content database, we need dismount it before we can rename it in SQL Server. To dismount use the following cmdlet;

Dismount-SPContentDatabase SharePint_ContosoContent

Now the database is ready to rename.  Open up SQL Management Studio and connect to your Database Server hosting SharePoint.  Now usually when you go to rename a database you will get an error message stating that the database is in use.  To get around that we turn our database into Single User mode, rename it and then set it back to multi user mode with the following SQL snippet.

USER Master
-- Set to Single User to prevent unable to lock out
ALTER DATABASE SharePint_ContosoContentDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE
-- Rename Database
ALTER DATABASE SharePint_ContosoContentDB MODIFY NAME = [SharePoint_ContosoContentDB]
-- Set back to multi user for production use
ALTER DATABASE SharePoint_ContosoContentDB SET MULTI_USER

Now once we have renamed the database on our SQL Server, it is time to mount it back onto SharePoint, we do that by issuing the following PowerShell on our SharePoint server

Mount-SPContentDatabase SharePoint_ContosoContentDB -WebApplication http://intranet.contoso.com/

And there you have it, renaming a SharePoint content database if you make a typo like me.