Jump to Content
Developers & Practitioners

How To Create a Windows Server VM instance in Compute Engine

December 7, 2022
https://storage.googleapis.com/gweb-cloudblog-publish/images/build_2022.max-2500x2500.jpg
Bukola Ayodele

Developer Advocate

If you want to create a Windows Server Virtual Machine (VM) in Compute Engine, it's as quick and easy as clicking a few buttons! 

In this blog post, we’ll learn how to create a Windows Server VM in Compute Engine. If you want to follow along with this blog post, check out the documentation and in-console tutorial.

Step 1

The first step is to create a new project; we will use an existing project called “test-ctd”. If you are unable to use an existing project, you will need to create a new project. Next we’ll enable the Compute Engine API which is necessary for creating a Windows Server VM instance. If you have billing enabled and or are in your free trial mode you’ll be able to enable the necessary APIs with a button labeled "Enable Apis".

https://storage.googleapis.com/gweb-cloudblog-publish/images/Enable_APIs_In_Google_Cloud_Project_Ga1UxO.max-2000x2000.png
Enable APIs In Google Cloud Project

Step 2

The second step is to create the Windows Server VM instance. In the Google Cloud console navigate to Compute Engine > VM instances, this where you’ll be able to create VM instances from micro-VMs to larger instances like Debian, Windows or Linux. 

https://storage.googleapis.com/gweb-cloudblog-publish/images/Create_Instance_Page.max-2200x2200.png
Create Instance Page

We’ll click the Create Instance button, and then fill in the requirements to create a VM instance. Starting first with the name, we’ll use the name testwindowsinstance. Make sure to remember the name because we’ll need it to find the new instance later.

https://storage.googleapis.com/gweb-cloudblog-publish/images/Name_VM_Instance.max-1600x1600.png
Name VM Instance

Next step is to change the Boot Disk; we’ll scroll down to the section that has Boot Disk and click the button labeled CHANGE. On the Public images tab, we’ll change the operating system to Windows Server and choose Select

https://storage.googleapis.com/gweb-cloudblog-publish/images/Choose_Operating_System.max-1600x1600.png
Choose Operating System

Next we’ll scroll down to the Firewall Section and select Allow HTTP Traffic, this will allow specific network traffic from the Internet. 

https://storage.googleapis.com/gweb-cloudblog-publish/images/Allow_HTTP_Traffic.max-1600x1600.png
Allow HTTP Traffic

Finally, we’ll click the button labeled Create to generate a Windows VM instance. 

Step 3

With the Windows Server VM instance created, it's time to connect to the VM instance. If there is a green check mark next to the Status, this indicates that the VM is running.

https://storage.googleapis.com/gweb-cloudblog-publish/images/VM_Instance_Running.max-1500x1500.png
VM Instance Running

To set a password for the VM, use Remote Desktop Protocol. Navigate to Connect > RDP and choose Set Windows Password. This brings us to a screen where we will choose a username, then a password is automatically generated for this Windows Server VM instance. Make sure to copy the password so you can log into the VM instance. Then you’ll be able to connect to the VM instance using RDP.

https://storage.googleapis.com/gweb-cloudblog-publish/images/Screen_Shot_2022-11-21_at_5.11.03_PM.max-1400x1400.png
Setting Windows Passwords
https://storage.googleapis.com/gweb-cloudblog-publish/images/Setting_Password_1.max-2200x2200.png
Generating Password

Step 4

For the final step, we will delete the VM instance created to prevent incurring charges. Return to Compute Engine > VM Instance to the side of the instance there is a menu icon that will open a menu bar that allows you to delete the instance. Click DELETE to remove the instance. 

https://storage.googleapis.com/gweb-cloudblog-publish/images/Delete_Instance_1.max-1600x1600.png
Delete Instance

In Conclusion

There you have it! You’ve created a Windows VM Instance in Compute Engine. If you’d like to follow an interactive tutorial, check out this Create a Linux VM instance in Compute Engine tutorial

Posted in