In rare cases it can happen that Windows on GCP either cannot be activated or loses its activation.


The problem then most likely is, that the activation service cannot talk to the Google's license server, either because of a firewall rule blocking outgoing connections to port 1688 or Windows forgot where its license server is.


First check if you can reach Google's license server:

powershell.exe Test-NetConnection kms.windows.googlecloud.com -Port 1688

resp.

powershell.exe Test-NetConnection 35.190.247.13 -Port 1688

(this is the resolved IP of kms.windows.googlecloud.com)


You then should get an output like this that shows that the test is successful:


If it fails, check your Windows firewall if it is blocking it or if that isn't the case it might also be GCP firewall (BYO-GCP) that is blocking it.


If the test above is successful, open a command prompt and enter the following two commands:

cscript \windows\system32\slmgr.vbs /skms 35.190.247.13:1688
cscript \windows\system32\slmgr.vbs /ato

which then should give the following output:

It should state that the "Product activated successfully"


Finally check Windows Activation [Win]+I > Activation