1). Moving an AWS AMI from one region to another causes Windows Validation to fail (180 days between checks). To tell Windows OS what validation server to use, run this powershell command as an admin.
1 | C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -Schedule |
It also resets the Administrator password, so ensure you have a backup admin user.
2). Windows Server 2016 or 2019: Windows displays message indicating to activate windows, clicking the button in the control panel does not succeed
C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1; cscript “${env:SYSTEMROOT}\system32\slmgr.vbs” /ato