Overview

If your Windows Server is automatically shutting down every 1 to 2 hours, or you are seeing a "Windows license expires" watermark in the bottom-right corner of your desktop, this indicates that the Windows Server license has expired. This is common in virtualized environments, trial installations, or servers where the license has not been properly activated.

This article walks you through two methods to resolve this issue. Option 1 is a quick, temporary fix, while Option 2 provides a more permanent solution - we suggest using Option 2.


Symptoms

Before proceeding, confirm that your issue matches the symptoms below:

  • Your server restarts or shuts down automatically every 1 to 2 hours without warning.
  • A watermark or notification appears in the bottom-right corner of your desktop stating that the Windows license has expired.
  • You may also see a message prompting you to activate or renew your Windows license.

If you are experiencing these symptoms, continue to one of the solutions below.


Option 1: Quick Fix Using slmgr.vbs -rearm

This is the simplest method to resolve the issue and can be completed in just a few steps. It temporarily extends the license grace period, which will stop the automatic shutdowns.

Steps

  1. Open the Start Menu on your server.
  2. Search for Command Prompt and open it as Administrator (right-click and select Run as administrator).
  3. Type the following command and press Enter:
slmgr.vbs -rearm
  1. Once the command has finished running, you will see a confirmation message. Click OK to close it.
  2. Restart your server to apply the changes.

Important Notes

  • The -rearm command resets the Windows activation grace period back to its default length (typically 180 days for Windows Server).
  • This command can only be run a limited number of times (usually up to 5) before it stops working. If you have already used it multiple times, it may no longer be available as an option.
  • If this method no longer works for you, proceed to Option 2 below.

Option 2: Permanent Fix Using the MAS Activation Script

If Option 1 is no longer available or you need a longer-term solution, this method uses the Microsoft Activation Scripts (MAS) tool to activate your Windows Server with a KMS38 license. This ties the activation to your server hardware and does not expire.

Steps

Part A: Change Your Windows Edition

  1. Open the Start Menu.
  2. Search for PowerShell and open it as Administrator (right-click and select Run as administrator).
  3. Copy and paste the following command into the PowerShell window and press Enter:
irm https://get.activated.win | iex
  1. Wait for the script to load. A menu will appear in the PowerShell window.
  2. Press 7 to open the Extras menu.
  3. Press 1 to select Change Windows Edition.
  4. From the list of available editions, press 1 to select ServerStandard.
  5. Wait for the process to complete. The script will prompt you to restart your server.
  6. Press Y to confirm and restart.

Part B: Activate Using KMS38

Once your server has restarted, you will need to run the script again to activate your license.

  1. Open PowerShell as Administrator again.
  2. Run the same command as before:
irm https://get.activated.win | iex
  1. Wait for the menu to appear.
  2. Press 3 to select KMS38.
  3. Press 1 to initiate KMS38 Activation.
  4. Wait for the activation process to complete. Follow any on-screen prompts.

Once activation is successful, your server should no longer shut down automatically or display the license expired watermark.

Important Notes

  • KMS38 activation is designed for Windows Server and binds the license to your current hardware. Avoid making significant hardware changes to the server, as this may invalidate the activation.
  • The MAS script is a third-party tool and is not an official Microsoft activation method. It is most commonly used in lab, development, or internal environments.
  • Ensure you are downloading and running the script only on a trusted network to avoid potential security risks.

Troubleshooting

Issue Possible Cause Solution
slmgr.vbs -rearm says it has reached the maximum number of rearms The command has been used the maximum number of times allowed Proceed to Option 2
PowerShell script does not load or returns an error Network connectivity issue or script blocked by firewall Check your internet connection and ensure PowerShell is not restricted by a security policy
Server still shuts down after completing Option 2 Activation did not complete successfully Re-run Part B of Option 2 and confirm the activation status message
Activation says the product key is not valid Incorrect Windows edition was selected Re-run Part A and ensure you select the correct edition for your server

Need Help?

If you have followed the steps above and are still experiencing issues, please contact our support team. Be sure to include the following details in your request:

  • Your Windows Server version and edition
  • A description of the issue you are experiencing
  • Any error messages you have received during the process
Дали Ви помогна овој одговор? 3 Корисниците го најдоа ова како корисно (6 Гласови)