GoogleCloudPlatform / GoogleCloudPlatform/compute-image-windows

GCESysprep - WinRM HTTPS Listener configuration on Windows 10 2004 silently fails

Open
#201 1 comment 0 reactions 1 assignee Claimed by @bkatyl View on GitHub
Dominant language
PowerShell
Stars
112
Forks
68
PR merge metrics
No merged PRs in 30d

Description

### Overview
On a "vanilla" Windows 10 Enterprise 2004 image, the _instance_setup.ps1_ script fails to configure the HTTPS listener for WinRM. The script does not produce an error, but when the GCESysprep has completed, the HTTPS listener has not been created.

### Steps to reproduce
1. Prepare a VMware VM running Windows 10 Enterprise 2004
2. Apply all available Windows Updates
3. Install the Google Cloud SDK
4. Import the VM using the GCE Import Image tool
5. Use the image to create a VM on a sole-tenant node.
6. Connect to the GCE VM and run GCESysprep (no command-line switches)
7. Power on the VM after GCESysprep completes (or create an image and a new VM).
8. Observe the Serial port 1 output to confirm that no errors are reported and the "Setup of WinRM complete." message is logged
9. Connect to the instance via RDP (or non-HTTPS remote PowerShell) and run the following PowerShell command from an elevated prompt: `Get-ChildItem -Path WSMan:\localhost\Listener`
10. Note that the HTTPS listener is not present.

### Proposed workaround
Running 'winrm quickconfig' prior to configuring the listener resolves the issue.
I inserted the following commands at line 134 of _instance_setup.ps1_ and confirmed that the HTTPS listener is successfully created:

`winrm quickconfig -quiet -force`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.