2014-12-30

Check Microsoft Office 2010/2013 activation type and status. Change from MAK to KMS (or from KMS to MAK). Troubleshoot KMS activation.

To check if your office is activated with MAK or KMS key:
 
1. Launch CMD as administrator
 
2. In command prompt navigate to Office installation folder:
Office 2010: C:\Program Files (x86)\Microsoft Office\Office14
Office 2013: C:\Program Files (x86)\Microsoft Office\Office15
Office 2010 x32: C:\Program Files\Microsoft Office\Office14
Office 2013 x64: C:\Program Files\Microsoft Office\Office15
 
3. In the command prompt type "cscript ospp.vbs /dstatus" (without quotes) and press enter
 
4. You can identify license type from "LICENSE NAME" and activation status from "LICENSE STATUS"
example of MAK activated Office 2013:
example of KMS activated Office 2010:
 
To change from MAK activation to KMS (or vice versa) - change to appropriate key:
 
1. Launch CMD as administrator
 
2. In command prompt navigate to Office installation folder:
Office 2010: C:\Program Files (x86)\Microsoft Office\Office14
Office 2013: C:\Program Files (x86)\Microsoft Office\Office15
Office 2010 x32: C:\Program Files\Microsoft Office\Office14
Office 2013 x64: C:\Program Files\Microsoft Office\Office15
 
3. Change to KMS key by entering the following command with corresponding KMS keys:
Office 2010 ProPlus: cscript ospp.vbs /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
Office 2013 ProPlus: cscript ospp.vbs /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT
 
note: those are KMS keys available publicly, if you need to change from KMS to MAK, enter your MAK keys instead
 
4. After changing the key you can go ahead and activate office to KMS host by entering command in the cmd: "cscript ospp.vbs /act" (without quotes).
 
If KMS activation fails you can check the following:
 
1. See if the right KMS host resolves from DNS:
In the command prompt run "nslookup -type=srv _vlmcs._tcp" (without quotes),
you should see something like this:
_vlmcs._tcp.pzu.lt      SRV service location:
          priority       = 0
          weight         = 0
          port           = 1688
          svr hostname   =
kms-host.company.com
kms-host.company.com      internet address = 192.168.1.17
 
2. If you see correct host, check if you can access it on port 1688:
in the command prompt type "telnet kms-host.company.com 1688"
If connection is successful you will see black window, if it's not successful you will receive message:
Connecting To kms-host.company.com...Could not open connection to the host, on port 1688:
Connect failed
 
3. If you see incorrect host, you should resolve problems in your infrastructure (deactivate wrong KMS hosts and delete entries from your DNS server). Meanwhile you can specify KMS host to activate to manually by running the following command "cscript ospp.vbs /sethst:kms-host.company.com" (without quotes)
and activate afterwards with the command "cscript ospp.vbs /act" (without quotes).
 
Links:

2014-12-16

Website publishing on TMG 2010. HTTP to HTTPS and domain.com to www.domain.com redirect with response code 301 (for search engine optimization and pageRank).

Consider the following scenario:
You need to publish a new secure website and to avoid situations where users can't access your site because they do not know the difference between http vs. https nor www.company.com vs. company.com

For this we will need to setup some redirection rules.

There are few ways you can do that via TMG, but it will result in 302 redirects which you want to avoid and instead use 301 response code for redirection (so I've been told by SEO guys).

So our goal is to configure IIS/TMG to redirect the following addresses with response code 301:
http://company.com
https://company.com
http://www.company.com

to https://www.company.com

First step - configuring IIS applications.

For this to work we will need two IIS applications. One for redirects and another one - the actual application.
For your actual application in IIS assign binding address: https://www.company.com
For redirection application assign bindings for addresses: http://company.com, https://company.com and http://www.company.com
And enable HTTP redirect to https://www.company.com with status code: Permanent (301).


Second step - TMG rules.
We will need two TMG rules with common weblistener.

Connections tab:
Enable HTTP connections
Enable SSL (HTTPS) connections
Do not redirect traffic from HTTP to HTTPS
First publishing rule for www.company.com (make sure it is above second rule)Bridging tab:
Redirect requests to HTTP
Redirect requests to SSL

Public name: www.company.com

Second rule for company.com (make sure it is below first rule).
Settings are identical to first rule, except for public name you specify domain company.com
After that any of the four addresses
http://company.com
https://company.com
http://www.company.com
https://www.company.com
should result in https://www.company.com

Links:
How to Allow HTTP 301 through ISA Server 2006 - http://blogs.technet.com/b/isablog/archive/2009/03/05/how-to-allow-http-301-through-isa-server-2006.aspx
Test your redirect method - http://www.redirect-checker.org/