Google Cloud Associate Cloud Engineer — Question 56
You are setting up a Windows VM on Compute Engine and want to make sure you can log in to the VM via RDP. What should you do?
Answer options
- A. After the VM has been created, use your Google Account credentials to log in into the VM.
- B. After the VM has been created, use gcloud compute reset-windows-password to retrieve the login credentials for the VM.
- C. When creating the VM, add metadata to the instance using 'windows-password' as the key and a password as the value.
- D. After the VM has been created, download the JSON private key for the default Compute Engine service account. Use the credentials in the JSON file to log in to the VM.
Correct answer: B
Explanation
The correct answer is B because using gcloud compute reset-windows-password is the proper method to retrieve login credentials for a Windows VM on Compute Engine. Option A is incorrect as Google Account credentials are not used for RDP login. Option C is not valid since 'windows-password' metadata is not a recommended method for setting up RDP access. Option D is also incorrect because the JSON private key is not used for logging in via RDP.