Error: 0x8007232B DNS Name Does Not Exist

KB ID 0001622

Problem

Seen when attempting to ‘Activate’ a Window machine;

Error: 0x8007232B DNS name does not exist

Solution

The reason for this error is the Windows machine has looked for a KMS (Key Management Server) in its local DNS, and not found one. This is because (out of the box) it has a Windows KMS licence code installed. Now if you have a KMS server you need to work out why you cant see it, I’ve covered troubleshooting KMS in link below;

Using a KMS Server

So if you don’t have a KMS server and dont wish you deploy one, you need to change, the Windows activation code on this machine to a MAK (Multiple Activation Key) instead,  Note: you will get these keys from the Microsoft Volume Licence Service Center. Then from an administrative command window;

[box]

slmgr -ipk 12345-ABCDE-12345-ABCDE-12345
slmgr -ato

[/box]

Related Articles, References, Credits, or External Links

NA

Recovering Windows Activation Keys

KB ID 0001115

“Have you got one of those programs that gets the Windows key?”, My colleague asked me the other week. I said “Just download a key finder application?”, “Yeah I’ve tried that and is showing the code as all B’s”.

You may also just see ‘Product key was not found‘ on some software.

I sent him some more links and got back to what I was doing. He was having no joy with any other software, so I wandered over to have a look.

Solution

Let me save you some time: If you are trying to recover a Volume Licence Key (MAK, Multiple Activation Key) YOU CAN’T, they are deleted from the machine when the machine is activated (apart from the last five characters.)

How To Check If You are Running a Windows Volume Licensed Version;

Run the following command;

[box]

slmgr /dlv

[/box]

Volume Licenced.

You can see that this particular machine is running on a volume licence. You will all note that further down it gives you the last five characters of the actual key “BHCH3”. This is to stop people just extracting a Volume Licence, once activated, because Windows removes the key. It takes the last five characters of the key and stores them in a file called ‘tokens.dat’, You will find it at

C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat

You will see the similar information if you run the Microsoft Genuine Advantage Diagnostic Tool;

 

Retail

To recover a key from a retail version of Windows is easy, most free key finders will recover keys for you.

There is another curve ball, that might set you off in the WRONG DIRECTION as well, if you trawl the forums you will find scripts that will ‘tell you’ they decode the registry keys that usually hold the windows key, like this;

You will see posts that say, “no don’t use that registry key ‘DigitalProductID’ change it to ‘DigitalProductID4’ and it will work”. Well it does work! But sadly the key you get will not.

Download the scripts to see for yourself ‘GetProductKey

Related Articles, References, Credits, or External Links

NA

Using a KMS Server

KB ID 0000582

Problem

Given the amount of deployments I do, it’s surprising that I don’t use KMS more often. Like most technical types, I find a way that works for me, and that’s the way I do things from then on. However these last few weeks I’ve been putting in a new infrastructure for a local secondary school. Their internet access is through a proxy server, that refuses to let Windows activation work. Unfortunately the “Administrators” of this proxy server were not disposed to give me any help, or let me anywhere near it, to fix it.

So after activating a dozen servers over the phone, I decided enough was enough “I’m putting in a KMS Server!”

I’m deploying KMS on Windows Server 2008 R2, and it is for the licensing and activation of Serer 2008 R2 and Windows 7. I will also add in the licensing KMS mechanism for Office 2010 as well.

Note: If you are using Server 2003 it will need SP1 (at least) and this update.

Solution

To be honest it’s more difficult to find out how to deploy a KMS server, than it actually is to do. I’ve gone into a fair bit of detail below but most of you will simply need to follow steps 1-4 (immediately below). In addition, after that I’ve outlined how to deploy KMS from command line. Then how to test it, and finally how to add Microsoft Office 2010 Licenses to the KMS Server.

Install Microsoft Windows 2008 R2 Key Management Service (EASY)

1. The most difficult part is locating your KMS Key! If you have a Microsoft License agreement, log into the the Microsoft Volume License Service Center, and retrieve the KMS License Key for “Windows Server 2008 Std/Ent KMS B”

Note: To License/Activate Server 2008 R2 AND Windows 7 THIS IS THE ONLY KEY YOU NEED. You do NOT need to add additional keys for Windows 7. (You DO for Office 2010, but I’ll cover that below).

2. Armed with your new key, you simply need to change the product key on the server that will be the KMS server, to the new key. Start > Right Click “Computer” > Properties. (Or Control Panel > System). Select “Change Product Key” > Enter the new KMS Key > Next.

3. You will receive a warning that you are using a KMS Key > OK. You may now need to activate your copy of Windows with Microsoft, this is done as normal, if you can’t get it to work over the internet you can choose to do it over the phone.

4. In a corporate environment (behind an edge firewall) you may have the local firewall disabled on the server. If you do NOT then you need to allow access through the local firewall for the “Key Management Service”, (this runs over TCP port 1688). To allow the service, Start > Firewall.cpl {enter} > Allow program or feature through Windows Firewall” > Tick Key Management Service > OK.

Note: Should you wish the change the port the service uses, you can do so with the following command, i.e. to change it to TCP Port 1024;

[box]

cscript c:\Windows\System32\slmgr.vbs /SPrt 1024

[/box]

That’s It! That is all you should need to do, your KMS Server is up and running.

Install Microsoft Windows 2008 R2 Key Management Service from Command Line

You will notice below that I’m running these commands from command windows running as administrator (Right click “Command Prompt” > Run as administrator).

1. Locate your “Windows Server 2008 Std/Ent KMS B” Key > From command line issue the following command;

[box]

cscript c:\Windows\System32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

[/box]

Note: To License/Activate Server 2008 R2 AND Windows 7 THIS IS THE ONLY KEY YOU NEED. You do NOT need to add additional keys for Windows 7. (You DO for Office 2010, but I’ll cover that below).

2. Providing the command runs without error, we have just changed the product key for this Windows server to be the KMS key.

3. Now we need to activate the Windows Server > Run the following command;

[box]

c:\Windows\System32\slui.exe

[/box]

Select “Activate Windows online now” > Follow the on screen prompts.

4. When complete, it should tell you that it was successfully activated.

5. In a corporate environment (behind an edge firewall) you may have the local firewall disabled on the server. If you do NOT then you need to allow access through the local firewall for the “Key Management Service”, (this runs over TCP port 1688). To allow the service, Start > Firewall.cpl {enter} > Allow program or feature through Windows Firewall” > Tick Key Management Service > OK.

Note: Should you wish the change the port the service uses, you can do so with the following command, i.e. to change it to TCP Port 1024;

[box]

cscript c:\Windows\System32\slmgr.vbs /SPrt 1024

[/box]

That’s It! That is all you should need to do, your KMS Server is up and running.

Testing the Key Management Server

Before it will start doing what you want it to, you need to meet certain thresholds, with Windows 7 clients it WONT work till it has had 25 requests from client machines. If you are making the requests from Windows 2008 Servers then the count is 5. (Note: For Office 2010 the count is 5 NOT 25)

Interestingly: On my test network I activated five Windows 7 machines, then one server, and it started working.

Windows 7 and Windows 2008 R2 have KMS Keys BUILT INTO THEM, if you are deploying/imaging machines you should not need to enter a key into them (unless you have entered a MAK key on these machines then you will need to change it to a client KMS Key). These are publicly available (see here).

1. The service works because it puts an SRV record in your DNS, when clients want to activate, they simply look for this record before they try and activate with Microsoft, if they find the record, they activate from your KMS Server instead. If you look on your domain DNS servers, expand “Forward Lookup Zones” > {your domain name} > _tcp > You will see an entry for _VLMCS that points to your KMS Server.

2. From your client machines you can test that they can see the SRV record, by running the following command;

[box]

nslookup -type=srv _vlmcs._tcp

[/box]

Note: If this fails, can your client see the DNS server? And is it in the domain?

3. There is no GUI console for KMS to see its status, so run the following command on the KMS server;

[box]

cscript c:\Windows\System32\slmgr.vbs /dli

[/box]

4. As I’ve mentioned above, with Windows clients you need 25, and Windows Servers you will need 5 requests before KMS will work, before this you will see;

Windows Activation
A problem occurred when Windows tried to activate. Error Code 0xC004F038

5. For each of these failures, look-in the KMS Server, and the “Current count” will increment by 1 till it starts to work). In a live environment this wont be a problem, (You probably wont be looking at KMS with less than 25 clients!). On a test network just clone/deploy a load of machines until you hit the threshold.

Troubleshooting KMS Clients

To make things simple the command to execute on the clients, is the same command that you run on the KMS server to check the status.

[box]

cd c:\windows\system32
slmgr /dli

[/box]

For further troubleshooting, see the following links.

How to troubleshoot the Key Management Service (KMS)

Managing License States

Adding an Office 2010 KMS Key to Your KMS Server.

In addition to servers and clients, KMS can activate and handle Office 2010 licenses as well. You simply need to add in Office support, and your Office 2010 KMS key. As mentioned above, unlike Windows clients, you only need five requests to the KMS server before it will start activating Office 2010 normally.

If you want a KMS Server for JUST OFFICE 2010 and not Windows, then simply install and run the Office 2010 Key Management Service Host.

1. First locate your Office 2010 KMS Key! If you have a Microsoft License agreement, log into the the Microsoft Volume License Service Center, and retrieve the KMS License Key for “Office 2010 Suites and Apps KMS”

Note: As with Windows 7, and Server 2008 R2, Office 2010 comes with a KMS key already installed, if you have changed the key to a MAK key you can change it back using the Microsoft public KMS keys (see here).

2. Download and run the “Microsoft Office 2010 KMS Host License Pack“.

3. When prompted type/paste in your “Office 2010 Suites and Apps KMS” product key > OK.

4. It should accept the key.

5. Press {Enter} to close.

6. Once you have five Office 2010 installations they should start to activate from your KMS server.

Troubleshooting Office 2010 KMS Activation

If you have a client that refuses to work you can manually force it to activate against your KMS server;

x64 Bit Clients. (Where kms.domaina.com is the FQDN of the KMS server)

[box]

cscript "C:\Program Files (x86)\Microsoft Office\Office14\OSPP.VBS" /sethst:kms.domaina.com 
cscript "C:\Program Files (x86)\Microsoft Office\Office14\OSPP.VBS" /act 

[/box]

x32 Bit Clients. (Where kms.domaina.com is the FQDN of the KMS server)

[box]

cscript "C:\Program Files\Microsoft Office\Office14\OSPP.VBS" /sethst:kms.domaina.com
cscript "C:\Program Files\Microsoft Office\Office14\OSPP.VBS" /act [/box]

Related Articles, References, Credits, or External Links

KMS Activation – Error: 0xC004C008

Finding Out Your Microsoft Office Licence Version

KB ID 0001385

Problem

While doing some upgrades on a clients RDS farm this week, I needed to find out what version  of Microsoft Office they were running. I’m not talking about Office 2013, Office 2016, etc, that’s easy to find out, (run appwiz.cpl and look in Add/Remove Programs). I’m taking about are you running a retail copy, or a volume licensed copy, or an Office 365 Office subscriptions copy.

Solution

For some time now every time Office has been installed it has installed a small vbs script that will tell you what you want to know, this script is called ospp.vbs. Where it lives, depends on two things;

  • Are you running an x32 or x64 version of Microsoft Office.
  • What Release of office are you running (2016, 2013, 2010 etc).

x64 bit versions of office ospp.vbs location

%installdir%\Program Files\Microsoft Office\Office{version number}

x32 bit versions of office ospp.vbs location

cscript “C:\program files (x86)\Microsoft Office\Office{version number}

Determine your Office {version number}

  • OfficeXP: Office10
  • Office 2003: Office11
  • Office 2007: Office12
  • Office 2010: Office14
  • Office 2013: Office15
  • Office2016: Office16

Armed with that information you can run the script, if you didn’t already know you execute .vbs scrips by calling them with the cscript command, so either change to the correct directory and execute the script directly, or use the full patch to the script in the command like so;

[box]

cd "C:\program files (x86)\Microsoft Office\Office16\"
cscript ospp.vbs /dstatus

OR

cscript "C:\program files (x86)\Microsoft Office\Office16\ospp.vbs" /dstatus 

[/box] 

Examples;

 

Related Articles, References, Credits, or External Links

Office 2010 – Find your Version and Licensing Information

Activation Error: Code 0x8007232b DNS Name does not exist

KB ID 0000157 

Problem

Note: For a more modern version this post go here: Error: 0x8007232B DNS Name Does Not Exist

Essentially this happens because you are using “volume licensed media” to install the operating system, and the machine is looking for a server on your network that runs the KMS Service (Key Management Service). You need to have a KMS server if you are activating more than 25 machines. However most of us only have one or two to worry about, in that case you need to enter a MAK (Multiple Activation Key).

Note: If you are running a legal copy of Windows then getting a MAK key should be as easy as going to Microsoft eOpen or speaking to your software reseller.

 

Solution

Once you have your MAK Key

Option 1

1. Click Start > Control Panel > System > Windows Activation Section > Change Product Key.

2. Enter the new MAK Key then activate Windows.

Option 2

1. Start > Right Click “Command Prompt” > “Run as Administrator“.

2. Enter the following command slmgr –ipk ABCDE-12345-ABCDE-12345-ABCDE

3. Wait for the “successful” prompt.

4. re-run activation.

Where ABCDE-12345-ABCDE-12345-ABCDE is a valid MAK (Multiple Activation Key).

Related Articles, References, Credits, or External Links

NA

Windows Server 2012 and Windows 8 – Activation Error 0xC004F074

KB ID 0000766

Problem

I jumped on a clients remote desktop services server today and saw;

However when I went to activate;

Windows couldn’t be activated
Error Code: 0xC004F074
Error Description:the Software Licensing Service reported that the product could not be activated. No Key Management Service (KMS) could be contacted. Please see the Application Event Log for additional information.

Solution

Out of the box this version of Windows has installed with a KMS Key, that’s fine if you are going to run KMS, here’s how to set it up. But if you want to activate with MAK key or a retail key then you need to manually change it.

1. Press Windows Key+R > cmd {enter} and execute the following command;

[box]
slmgr.vbs /ipk 12345-ABCDE-12345-ABCDE-12345[/box]

Where 12345-ABCDE-12345-ABCDE-12345 is your MAK or retail key

2. Now attempt to activate the machine again,

Note: You can also activate by running the following command;

[box] slmgr.vbs -ato[/box]

Related Articles, References, Credits, or External Links

Windows 8 – Changing the Unlock Code and Activating

Deploying Office 2010 via Group Policy

KB ID 0000464 

Problem

What used to be the simplest task, has now been overly complicated (Thanks Microsoft!) Simply deploying from a single .msi file would have been far too easy! This procedure uses group policy to install Microsoft Office 2010 via group policy. It uses the Microsoft preferred method of employing startup scripts.

Below I’ve also disabled UAC, I found it was stopping my automated install, (If I ran the script manually I was prompted by UAC to continue – that took me about 3 hours to work out).

It also automatically “Activates” Office as soon as its installed, (using a MAK key). In the following scenario I deployed Office 2010 (Pro Plus) x32 bit to Windows 7 machines. In a clean VMware test environment my target machine took 6 minutes to silently install. So on a production network it will probably take a little longer (be patient). But any more than 10 minutes and the process will time out, if that’s happening make sure you do this.

Solution

1. On a server create a shared folder called Office_2010, give Authenticated Users – read access.

2. . In that folder create a folder called LogFiles.

3. Copy the contents of the Office DVD to this share.

4. Open the shared folder locate the ProPlus.WW folder and open it.

5. Locate config.xml open it with notepad.
Change:

<Display Level=”full” CompletionNotice=”yes” SuppressModal=”no” AcceptEula=”no” />
to
<Display Level=”none” CompletionNotice=”no” SuppressModal=”yes” AcceptEula=”yes” />

6. You can also change Username and companyname if you wish.

7. Save and exit config.xml

8. While in the Office_2010 folder Shift+Right Click > Open New command windows here.

9. Run setup.exe /admin

10. Accept the defaults on the popup menus.

11. Locate “Licensing and User interface.”

12. Enter a valid MAK license key (Take out the dashes and/or spaces). Tick to accept the EULA, and set the display level to none.

13. Locate “Set feature installation stats”, and set for the Office features you require.

To Set Office to Auto Activate (Without user intervention).

 

14. Locate “Modify Setup properties” , add a new one.

15. Set the name the value to AUTO_ACTIVATE.

16. Set the value to 1 (number one), and click OK.

Note: If you need to remove previous versions of Office you will find the option to do that in here also.

17. Click File > Save as > Save the msp file in the shareupdates folder (you can call it what you want).

18. Open notepad and paste in the following text:

[box]

setlocal

REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************

REM Get ProductName from the Office product’s core Setup.xml file, and then add “office14.” as a prefix.
set ProductName=Office14.PROPLUS

REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=DC2AOffice_2010

REM Set ConfigFile to the configuration file to be used for deployment (required)
set ConfigFile=DC2AOffice_2010ProPlus.WWconfig.xml

REM Set LogLocation to a central directory to collect log files.
set LogLocation=DC2AOffice_2010LogFiles

REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************

IF NOT “%ProgramFiles(x86)%”==”” (goto ARP64) else (goto ARP86)

REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
:ARP64
reg query HKEY_LOCAL_MACHINESOFTWAREWOW6432NODEMicrosoftWindowsCurrentVersionUninstall%ProductName%
if NOT %errorlevel%==1 (goto End)

REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a

64bit OS)
:ARP86
reg query HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall%ProductName%
if %errorlevel%==1 (goto DeployOffice) else (goto End)

REM If 1 returned, the product was not found. Run setup here.
:DeployOffice
start /wait %DeployServer%setup.exe /config %ConfigFile%
echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%%computername%.txt

REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End

Endlocal

[/box]

19. Change the ProductName to the correct one you are deploying (search for ProductName in the setup.xml file that’s in the same folder you found config.xml in).

20. Change the THREE values in this script “DC2A” to your servername.

21. Save the file as a batch file (not a .txt file!) and right click the file > copy.

22. On your domain controller Start > Administrative tools > Group Policy management console > either create a new policy and link it to your COMPUTERS or edit an existing policy.

23. Navigate to:

[box] Computer Configuration > Policies > Windows Settings > Scripts > Startup. [/box]

24. Add the batch file you created earlier (open the folder and right click > paste).

Note: That should be all you need to do however – The first time I did this, UAC on the Windows 7 machines blocked the install, so I had to turn it off. You can do that in the same policy.

25. Navigate to:

[box] Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options[/box]

Set the Following:

a. User Account Control Behaviour of the elevation prompt for administrators in Admin approval mode – No Prompt or Elevate without Prompting.
b. User Account Control Detect Application installations and prompt for elevation – Disabled.
c. User Account Control Run all administrators in Admin approval mode – Disabled.

Timing

Policies like this will “time out” if running for more than 600 seconds (10 minutes). Our install may take longer than that, so you may need to set the time out in the policy, Navigate to:

[box] Computer Configuration > Policies > Administrative Templates > System > Scripts[/box]

Select “Maximum wait time for group policy scripts” set it to 0 (zero) for unlimited.

26. Close the policy editor.

Note: At this point every time Office starts for a new user, it presents you with:

27. To Suppress that you need to create a USER policy with a Custom ADM Template, download the template here.

28. Note this is a USER Policy, so if you add it to the policy you have already created to deploy Office, then that policy needs to be linked to your users. So I would just create a new user policy and link it separately. Navigate to:

[box] User Configuration > Administrative Templates > Classic Administrative Templates (ADM) > Microsoft Office 2010 > Miscellaneous [/box]

29. Locate the “Suppress recommended settings dialog” and enable it.

Related Articles, References, Credits, or External Links

Office 2010 Administrative templates.

 

Office Find your Version and Licensing Information

KB ID 0000566 

Problem

Note: This is an OLD post, you might want to look at the following article instead;

Finding Out Your Microsoft Office Licence Version

I had some licencing issues a couple of weeks ago with Office 2010, and needed to check my version and licence details, thankfully Office 2010 comes with a VB script that makes this easy.

Solution

Getting your Office Version and Licence Details

1. Launch a command window (Right click and select run as administrator, or select the cmd icon and press CTRL+SHIFT+ENTER).

2. You need to change to the directory that the script is in, this directory will be different if you are running x32 bit Office on an x64 bit machine. execute one of the following commands;

For x32 bit Office on x32 Bit machines, OR 64 bit Office on x64 bit machines;

[box]cd “C:Program FilesMicrosoft OfficeOffice14″[/box]

For x32 bit Office on x64 bit machines;

[box]cd “C:Program Files (x86)Microsoft OfficeOffice14″[/box]

3. Then execute the following command;

[box]cscript ospp.vbs /dstatus[/box]

Example Output

(Above) This installation of Office 2010 (Pro Plus) is UNLICENSED, (it’s waiting for a licence key to be installed). It will run for another 30 days like this, then this will happen. You can fix this by manually installing an Office MAK key, or setting up a KMS server on your network.

(Above) This installation of Office 2010 (Pro Plus) is LICENSED and has been activated with a MAK key.

(Above) This machine has RETAIL versions of both Office 2010 (Pro Plus), and Visio (Premium). Both are LICENCED, and activated with a retail (or box product) Key.

Other uses for ospp.vbs

Install a MAK Key on a remote machine;

[box]cscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx {remote-machine-name}[/box]

Activate a remote machine

[box]cscript ospp.vbs /act {remote-machine-name}[/box]

 

Related Articles, References, Credits, or External Links

NA

Change/Add Office 2013 Product Key

KB ID 0000821

Problem

Both ‘box product’ or retail versions of Office require you to add the key and activate them at install time. But volume licensed or MAK versions do not. This makes it easy for you to forget. If you use KMS that’s not a problem, by default they will licence themselves from there. However if you need to put in a MAK key this has to be done manually or office will start complaining.

Solution

1. Launch an Office application, in this example I will use Word.

2. File > Account > change product key > Paste in your unlock code > Continue.

3. Close and re-open your Office application(s).

Related Articles, References, Credits, or External Links

Microsoft Office – (Product Activation Failed)

Using KMS Server for Windows Server 2008 R2, Windows 7, and Office 2010