Skip to content

GCESysprep failed when using on a non-English Windows #290

Description

@jacky9813

When trying to perform GCESysprep on an imported, non-English Windows, the following line will fail due to the firewall group display name is not Remote Desktop but its localized name, like 遠端桌面 in Chinese (Traditional) systems.

Set-NetFirewallRule -DisplayGroup 'Remote Desktop' -Enabled True

PowerShell is unable to find any matching rule, which caused GCESysprep to stop.

PowerShell Error
2026/06/17 11:02:43 GCESysprep: 找不到內容 'DisplayGroup' 等於 'Remote Desktop' 的 MSFT_NetFirewallRule 物件。請確認內容的值然後重試。 {Line: 289 :     Set-NetFirewallRule -DisplayGroup 'Remote Desktop' -Enabled True
, HResult: -2146233087, Script: C:\\Program Files\\Google\\Compute Engine\\sysprep\\sysprep.ps1}

The logs above can be translated as follow:

2026/06/17 11:02:43 GCESysprep: No MSFT_NetFirewallRule objects found with property 'DisplayGroup' equal to 'Remote Desktop''. Verify the value of the property and retry. {Line: 289 :     Set-NetFirewallRule -DisplayGroup 'Remote Desktop' -Enabled True
, HResult: -2146233087, Script: C:\\Program Files\\Google\\Compute Engine\\sysprep\\sysprep.ps1}

Instead, it can use something like this:

Set-NetFirewallRule -Group '@FirewallAPI.dll,-28752' -Enabled True

The Group property is not localized and @FirewallAPI.dll,-28752 is for Remote Desktop Firewall Group.


Alternatively, this also works:

Get-NetFirewallRule -Name 'RemoteDesktop-*' | Where-Object {$_.Name -notmatch '.*WSS?'} | Set-NetFirewallRule -Enabled True

The Name property is not localized and remained in English (for Remote Desktop rules at least).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions