{"id":138,"date":"2023-05-03T06:45:13","date_gmt":"2023-05-03T14:45:13","guid":{"rendered":"https:\/\/www.dumpsterfirecomputing.com\/?p=138"},"modified":"2023-05-03T06:45:15","modified_gmt":"2023-05-03T14:45:15","slug":"back-to-basics-windows-activation","status":"publish","type":"post","link":"https:\/\/www.dumpsterfirecomputing.com\/?p=138","title":{"rendered":"Back to Basics &#8211; Windows Activation"},"content":{"rendered":"\n<p>When was the last time you had to think about activating Windows?  Yea, it&#8217;s been awhile for me to.  Three years ago I helped write a server provisioning process to deploy a Windows server to any of our datacenter locations in a fully-automated way.  User submits a form with a few basic inputs and 10 or so minutes later they have a server.  As with nearly any modern process, it used the native KMS Client Key, activating Windows upon Domain Join.  It just works.  The problem is, when things get automated and &#8220;just work&#8221;, people forget how it all works under the hood.<\/p>\n\n\n\n<p>So yesterday I get pinged from an engineer who says two servers in his cluster show as requiring activation.  Definitely odd.  I say if they&#8217;re brand new servers, nuke and redeploy.  The phrase &#8220;<a rel=\"noreferrer noopener\" href=\"https:\/\/geektechstuff.com\/2021\/06\/24\/devops-what-does-cattle-not-pets-mean\/\" target=\"_blank\">cattle, not pets<\/a>&#8221; certainly applies with Servers (or should, anyway).  If it&#8217;s an existing server that&#8217;s been fine and is suddenly not activated, check a few things and reach out to the right folk.  Well, some time passed and the engineer came back saying none of the teams I directed him to could help him.  In addition, he&#8217;s trying to figure out how to open a ticket with Microsoft.  Yikes.  &#8220;Alright&#8221;, I say, &#8220;Give me a server name and I&#8217;ll poke.&#8221;<\/p>\n\n\n\n<p>First thing I do in this situation is check the time &#8211; are we sync&#8217;d or not.  Strange things happen when servers aren&#8217;t synchronized with domain controller time.  The fact I could even log in (to a server I&#8217;ve not logged in before) should have told me the time was good, but this was #NightShift so&#8230;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image.png\" alt=\"\" class=\"wp-image-139\" width=\"356\" height=\"210\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image.png 495w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-300x177.png 300w\" sizes=\"auto, (max-width: 356px) 100vw, 356px\" \/><\/figure>\n\n\n\n<p>I&#8217;ve at least validated that indeed, the server needs activating.<\/p>\n\n\n\n<p>The next step in any troubleshooting process involving a Windows Server is to check the event logs.  Which?  Any.  But I start with the Application Log.  It&#8217;s unfortunate that many times people either don&#8217;t think to look in the Event Logs, or go there and don&#8217;t know what to do with the information.  Some day I&#8217;ll write a better post about Event Logs&#8230;.<\/p>\n\n\n\n<p>First thing I like to do is filter the event logs.  Give me just the bad stuff, like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-1.png\" alt=\"\" class=\"wp-image-140\" width=\"315\" height=\"414\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-1.png 509w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-1-228x300.png 228w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><\/figure>\n\n\n\n<p>Next I take a look at what&#8217;s there, and sure enough we get a few random errors relating to Windows Activation.  In this particular case, they don&#8217;t really tell me anything useful that I don&#8217;t already know.  This one was particularly useless, but it confirmed that there&#8217;s definitely a problem of some kind:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-2.png\" alt=\"\" class=\"wp-image-141\" width=\"427\" height=\"314\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-2.png 669w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-2-300x221.png 300w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><\/figure>\n\n\n\n<p>Always, always check the Event Log.  You never know what you&#8217;ll find!<\/p>\n\n\n\n<p>The final step I take is to dig up the command line utility for checking licensing status.  I knew what the command was, but it&#8217;d been a very long time since I had to use it.  Our good friend slmgr.vbs<\/p>\n\n\n\n<p>Microsoft has a couple really good documents for licensing and the use of the utility.  The first is <a rel=\"noreferrer noopener\" href=\"https:\/\/learn.microsoft.com\/en-us\/windows-server\/get-started\/activation-troubleshoot-kms-general\" target=\"_blank\">Guidelines for Troubleshooting KMS<\/a><a rel=\"noreferrer noopener\" href=\"https:\/\/learn.microsoft.com\/en-us\/windows-server\/get-started\/activation-slmgr-vbs-options\" target=\"_blank\">, and the second is basically the command line syntax and usage for the slmgr.vbs<\/a> utility.  With a reminder of the syntax I was looking for, I ran a side-by-side comparison between the broken server (to the left of the image below) and a known-good server (to the right).  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"846\" height=\"478\" src=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-4.png\" alt=\"\" class=\"wp-image-144\" srcset=\"https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-4.png 846w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-4-300x170.png 300w, https:\/\/www.dumpsterfirecomputing.com\/wp-content\/uploads\/2023\/05\/image-4-768x434.png 768w\" sizes=\"auto, (max-width: 846px) 100vw, 846px\" \/><\/figure>\n\n\n\n<p>Yep, that&#8217;s broken alright.<\/p>\n\n\n\n<p>So at this point, I provided the engineer with all of the above data including the links.  I don&#8217;t know <em>what <\/em>happened to cause the license to be changed, but the fix should be easy enough.  If it were my server, I&#8217;d locate the publicly available Windows Server KMS Client key appropriate with the version of Windows Server being used, install that key, and force an activation attempt.  It&#8217;s all done via the slmgr.vbs utility.<\/p>\n\n\n\n<p>Check your logs frequently, don&#8217;t ignore the basics!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When was the last time you had to think about activating Windows? Yea, it&#8217;s been awhile for me to. Three years ago I helped write a server provisioning process to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,33],"tags":[35,34,27,36],"class_list":["post-138","post","type-post","status-publish","format-standard","hentry","category-troubleshooting","category-windows-server","tag-activation","tag-night-shift","tag-troubleshooting","tag-windows-server"],"_links":{"self":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts\/138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=138"}],"version-history":[{"count":3,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts\/138\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=\/wp\/v2\/posts\/138\/revisions\/146"}],"wp:attachment":[{"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dumpsterfirecomputing.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}