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
- Prepare a VMware VM running Windows 10 Enterprise 2004
- Apply all available Windows Updates
- Install the Google Cloud SDK
- Import the VM using the GCE Import Image tool
- Use the image to create a VM on a sole-tenant node.
- Connect to the GCE VM and run GCESysprep (no command-line switches)
- Power on the VM after GCESysprep completes (or create an image and a new VM).
- Observe the Serial port 1 output to confirm that no errors are reported and the "Setup of WinRM complete." message is logged
- 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
- 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
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
Get-ChildItem -Path WSMan:\localhost\ListenerProposed 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