Showing posts with label Microsoft. Show all posts

Key Management Service for Product Activation




Key Management Service
This is a Microsoft Service hosted on a Windows Server. This service is used to activate Microsoft products like Operating Systems, MS Office Suites, Sharepoint suites etc.
This service can be hosted on your Datacenter Infrastructure without the need to contact Microsoft over Internet. Clients can connect to KMS using DNS dynamic or static entries and communicates over RPC port 135

KMS Activation Thresholds
There is a minimum threshold of clients requesting for activation only after which the KMS server starts activating the clients. For Windows Server Operating Systems, the threshold is 5 systems and for Windows Desktop Operating, the threshold is 25 systems. Until this threshold is met, the systems are not activated however the client machines contact KMS server every 2 hours to see if they have exceeded the threshold count.
There are no restrictions whether it is Physical or Virtual Server or Desktops. 
The KMS Server provides each host with Client Machine Identification [CMID] and saves it in a CMID Table. 

KMS Activation Renewal
KMS Activations are valid for 180 days. By default, KMS Clients attempt to renew their activation every 7 days. If activation fails, the client will retry every 2 hours. Once the computer is activated, the validity begins again.

KMS Service Publication
KMS Service uses DNS SRV records to store and communicate the location of KMS hosts. The KMS Service can also be published manually to the client computers. Steps to manually publish KMS host is given later in this article. 
If there are more than 1 KMS Server in the environment, the Clients randomly selects a KMS server unless the DnsDomainPublishList has specific Priority and Weight configured in the registry to prioritize a KMS server for client requests.

Important Port and Communication
KMS uses 1688 TCP ports [unidirectional - from client as source and KMS server as destination] to communicate with the client machines. The client send a packet of 250 bytes for activation requests to which KMS Host responds with the Activation Count. If the Count is equal or above threshold value, the client is activated and the session is closed.

Note: KMS Host does not require a dedicated Host.

Activating KMS Host
KMS Keys are provided by Microsoft to activate the KMS host. Once the Key is configured on KMS Host, It needs to be activated with Microsoft either via Telephone or Online. No further communication with Microsoft is required. The same KMS Key can be used in activating a maximum of 6 KMS Hosts in your environment.
Now the 6 KMS hosts can be re-activated with the same key for 9 more times. If you need more than 6 keys, Contact Microsoft Activation Call Center

As far as the KMS Server is operational with valid KMS keys and dynamic DNS update is completed to create a KMS SRV record in the current domain DNS, the client machines should be able to discover the KMS server and activate itself.

Important Commands to Publish KMS Hosts manually and activate Client Machines
slmgr -ckms -> To clear current KMS Host configured on client machine
slmgr -skms <kmshostname>:1688 -> To set KMS Host on client machine
slmgr -ipk <product key of OS> -> To set the Product key of OS. Refer to this for current Product Keys presented by Microsoft [https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys]
slmgr -ato -> Activate the client machine against the set KMS server
slmgr TargetComputer [username] [password] /parameter [options] -> To perform slmgr commands remotely on the Target Computer
nslookup -type=all _vlmcs._tcp -> This command should show you all the KMS Hosts in your environment having valid SRV records

Related Posts

  • The other way to activate Microsoft Operating Systems are through MAK [Multiple Activation Keys] Activation. I will write a different post for MAK activations.- I will share the links shortly


  • How to use KMS Service in a Domain to activate Workgroup clients and other domain clients - I will share the links shortly


Reference Documents
https://docs.microsoft.com/en-us/previous-versions/tn-archive/dd979804(v%3dtechnet.10)

Various Ways to Login to MS Azure



Recently I underwent a training on Microsoft provided solution to Cloud Computing - I am referring about Microsoft Azure. MS Azure was announced to the world in 2008 and was finally presented on 1st February 2010

I will be covering a lot of aspects in the upcoming posts om Azure. In this post, I am only covering different ways to connect to your subscription on Azure Cloud

Classic Portal [Old Portal] 
This portal would not be used much in the future as Microsoft is planning on to decommission this portal completely and move on to much synchronized portal.
This Portal can be accessed using the Link https://manage.windowsazure.com 
The below screenshot is a glimpse of the Classic Portal

On the left hand side, we see set of options to select from. This pane is called the Hub Menu and once you click on any option, a new window is displayed which is called the Blades in Azure Terminology. The same stands true in case of the new Portal.

New Azure Portal
This is a New Portal presented by Azure which is more synchronized and is implemented to have better view and provides better usability. This Portal can be accessed by going to : https://portal.azure.com. This portal is easier to navigate and have tiles like view which can be easily customized as various components can be dragged and dropped on the tiles of the dashboard.
This portal also looks like the previous classic portal having the Hub Menu on the left hand side and blades which are displayed overlapping dashboard window. The White boxes are various Azure components like Resources, Resource Groups, VNet, Storage Accounts. In upcoming posts I will cover the major differences between these 2 portals and it is important to understand both the portals until the functionalities in classic portal are included in the newer portal.

Connect using Powershell
Every Cloud or Infrastructure Admin is aware that almost all the Mass Administration \ Automation is being carried out using Powershell scripts. Believe me you would not even connect to above 2 portals if you get comfortable with Powershell scripting as it has few very cool and swift ways to manage stuffs on the Azure Cloud.
Once the Windows SDK for VS 2013 and Microsoft Azure modules is installed on your machine, you are good to go with the scripting. Connect to the Azure Cloud using the Powershell script Login-AzureRMAccount. You will get a window to provide your Single Sign On Credentials like shown below
Once the credentials are verified and accepted, we would be able to proceed with managing the cloud environment from Powershell. You need not be connected to Corporate Network, Citrix and any VDI network. Microsoft Azure can be managed from anywhere via Internet access unless it is restricted by Administrators.


I would be sharing other posts on Azure and related technologies. Please share your view. Thanks