Showing posts with label CoreInfra. 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)

WMI Repository Troubleshooting and Rebuilding



Windows Management Instrumentation [WMI] is a Core Infrastructural set developed by Microsoft for management of Windows devices and data. It helps in scripting and fetching Windows component related to the devices and settings.

WMI caters to the requirements through the WBEM repository where it stores the vital information and it may get corrupt denying proper data as required.

Below are few steps to diagnose if WMI repository is corrupt and steps to troubleshoot OR rebuild the WMI repository

To Verify if WMI repository is fine

winmgmt /verifyrepository

If the Results shows Inconsistent, we can run the following command to repair the repository

winmgmt /salvagerepository

Once the repair is completed, try running /verifyrepository to check if it has fixed the WMI corruption issue. If not, follow the below steps to rebuild the repository

1.       Disable and stop the winmgmt service
2.       Remove or Rename C:\Windows\System32\wbem\repository
3.       Enable and start the winmgmt [Windows Management Instrumentation] service
4.       Open a CMD prompt as Administrator
5.       In the CMD prompt Navigate to C:\Windows\System32\wbem\
6.       Run the following command: ‘for /f %s in ('dir /b *.mof') do mofcomp %s’

Note: This will take a minute or so to complete.

7.       Now run the command: ‘for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s’
8.       Restart the Data Collector service

These steps should fix the issue with WMI repository


Default Passwords for Remote Management Boards for Physical Servers



All the Server Administrators have to deal with physical servers of different manufacturers and models. The market leaders are HP, Dell, IBM and Cisco Products who have a large range of physical Rack and Blade Servers. Every now and then, the Servers are out of reach making it difficult to troubleshoot connectivity issue remotely, so we have Remote Management Board connected to these servers to alternately connect to these physical boxes when they are not on network or probably down.

Now each of these vendors have different names for the Remote Management Board. HP calls it Integrated Lights Out [ILO], Dell calls it Dell Remote Access Card [DRAC], IBM calls it Integrated Management Module [IMM] and Cisco calls it [Cisco Integrated Management Controller]. They all serve the same purpose.

I am writing this post to provide the default passwords for these Remote Management Boards. When these RMBs are initially configured, we need these credentials to access the Boards.
Please find below credentials

Make
RMB
Username
Password
Remarks
HP
ILO
Administrator
Printed on the Tag
8 Character password printed on the tag of Hardware
Dell
DRAC
root
calvin

IBM
IMM
USERID
PASSW0RD
There is number “zero” in the password, not “O”
Cisco
CIMC
admin
password

What are VSS Writers and How to Troubleshoot Error States



Every Windows Administrator come across Backup Issues related to File Level Backup. We often see these issues are fixed mostly by reboot [as we all know Reboot fixes most of the issues] but it is hard to get the required Application\Server downtime to fix these issues. Also requesting the Server\Application owners for a reboot every now and then causes a lot of problem when it is caused on a single server more often.

We see most of the Backups are failed as one of the VSS writer is in Error\Failed or Waiting for Completion state. Reboot does fix these VSS writers and hence fixing the Backup Failure Issue.

What are these VSS Writers?
VSS Writers are Application Specific components designed by Microsoft [which is acronym of Volume Shadow Copy Service]. These Writers are compatible with various applications which helps in taking a complete snapshot of the data even though there are Ongoing Input\Output Transactions. This makes sure that there is no incomplete data collected. In the process if there are any transactions affecting the snapshot process the VSS writers may go into Error state hence causing Backup Failures. In this case most Administrators recommend rebooting the servers to fix this issue but there is a better way to decrease the downtime and fix the issue with the VSS writers by bringing them in stable state.

I have listed down few VSS writers and their associated Windows Services which can terminate the snapshot process and bring back the Writers in Stable state. Simply restart the below service if any VSS writer is in Error \ Failed or Waiting for Completion State.

VSS Writer Name Service Name Service Display Name
ASR Writer VSS Volume Shadow Copy
BITS Writer BITS Background Intelligent Transfer Service
Certificate Authority CertSvc Active Directory Certificate Services
COM+ REGDB Writer VSS Volume Shadow Copy
DFS Replication service writer DFSR DFS Replication
DHCP Jet Writer DHCPServer DHCP Server
FRS Writer NtFrs File Replication
FSRM writer srmsvc File Server Resource Manager
IIS Config Writer AppHostSvc Application Host Helper Service
IIS Metabase Writer IISADMIN IIS Admin Service
Microsoft Exchange Replica Writer MSExchangeRepl Microsoft Exchange Replication Service
Microsoft Exchange Writer MSExchangeIS Microsoft Exchange Information Store
Microsoft Hyper-V VSS Writer vmms Hyper-V Virtual Machine Management
MSMQ Writer MSMQ Message Queuing
MSSearch Service Writer WSearch Windows Search
NPS VSS Writer EventSystem COM+ Event System
NTDS NTDS Active Directory Domain Services
Registry Writer VSS Volume Shadow Copy
Shadow Copy Optimization Writer VSS Volume Shadow Copy
SMS Writer SMS_SITE_VSS_WRITER SMS_SITE_VSS_WRITER
SqlServerWriter SQLWriter SQL Server VSS Writer
System Writer CryptSvc Cryptographic Services
TermServLicensing TermServLicensing Remote Desktop Licensing
WMI Writer Winmgmt Windows Management Instrumentation


Remove Ghost Network Adapters




We often come across Virtual Machines facing performance issues. There are multiple causes for this sort of issues like high CPU or Memory usage. There could be issues due to the network switches connected to the Host machines as well. However there is one more thing that a VMware admin can check on the Virtual Machine. 

Below I have mentioned the steps to find out if there are any Ghost Network Adapters present on the Virtual Machine. Basically if there is a Ghost [or Phantom] NIC card present on the machine, this could also lead to connectivity issues or performance issues. Sometimes presence of Ghost NIC Cards does not allow us to configure the newly added NIC adapters. The Ghost NIC cards are registry entries created on the machine when a Virtual NIC card is added\removed from the VM settings. We need to make sure these Ghost NICs are checked if you encounter performance related or Networ related issues on the server.

Please find the steps below
1. Login to the Windows Server
2. Open Command Prompt and Run "set devmgr_show_nonpresent_devices=1"
3. The control will move to the next line without any output
4. Type "Devmgmt.msc". This will open Device manager
5. Click on "View" Menu and Select "Show Hidden Devices"
6. Uninstall all greyed NIC cards except for RSA Async Card



Memory Limitations in Windows Operating System Releases

Hello All,

There are multiple Microsoft Operating System releases with their own set of features and limitations. I am writing this post highlighting only Memory Limitations in each Windows Operating System Releases. I would be only covering Windows Server Operating Systems and not Desktop Operating Systems.

Please find below Table for more information:


Windows Server 2003
Version
Limit on x86
Limit on IA64
Windows 2003, Datacenter Edition
64GB [16GB with 4GT]
512GB
Windows 2003, Enterprise Edition
64GB [16GB with 4GT]
512GB
Windows 2003, Standard Edition
4GB

Windows 2003, Web Edition
2GB

Windows Small Business Server 2003
4GB

Windows Compute Cluster Server 2003

32GB
Windows Storage Server 2003, Enterprise Edition
8GB

Windows Storage Server 2003
4GB



Windows Server 2003 SP1
Version
Limit on x86
Limit on x64
Limit on IA64
Windows 2003 SP1, Datacenter Edition
64GB [16GB with 4GT]
1TB
1TB
Windows 2003 SP1, Enterprise Edition
64GB [16GB with 4GT]
1TB
1TB
Windows 2003 SP1, Standard Edition
4GB
32GB



Windows Server 2003 SP2
Version
Limit on x86
Limit on x64
Limit on IA64
Windows 2003 SP2, Datacenter Edition
64GB [16GB with 4GT]
1TB
2TB
Windows 2003 SP2, Enterprise Edition
64GB [16GB with 4GT]
1TB
2TB
Windows 2003 SP2, Standard Edition
4GB
32GB



Windows Server 2003 R2
Version
Limit on x86
Limit on x64
Windows 2003 R2, Datacenter Edition
64GB [16GB with 4GT]
1TB
Windows 2003 R2, Enterprise Edition
64GB [16GB with 4GT]
1TB
Windows 2003 R2, Standard Edition
4GB
32GB


Windows Server 2008
Version
Limit on x86
Limit on x64
Limit on IA64
Windows 2008, Datacenter Edition
64GB
1TB

Windows 2008, Enterprise Edition
64GB
1TB

Windows 2008, HPC Edition

128GB

Windows 2008, Standard Edition
4GB
32GB

Windows 2008, Itanium Based Systems


2TB
Windows Small Business Server 2008
4GB
32GB

Windows Web Server 2008
4GB
32GB



Windows Server 2008 R2
Version
Limit on x64
Limit on IA64
Windows 2008 R2, Datacenter Edition
2TB

Windows 2008 R2, Enterprise Edition
2TB

Windows 2008 R2, Itanium Based Systems

2TB
Windows 2008 R2, Foundation Edition
8GB

Windows 2008 R2, Standard Edition
32GB

Windows 2008 R2, HPC Edition
128GB

Windows 2008 R2, Web Edition
32GB


Windows Server 2012
Version
Limit on x64
Windows 2012, Datacenter Edition
4TB
Windows 2012, Standard Edition
4TB
Windows 2012, Essentials Edition
64GB
Windows 2012, Foundation Edition
32GB
Windows Storage Server 2012 Workgroup
32GB
Windows Storage Server 2012 Standard
4TB
Hyper-V Server 2012
4TB