MicrosoftDocs/WSL

instruction fails (Set-NetFirewallHyperVVMSetting -Name ‘{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}’ -DefaultInboundAction Allow)

ckuhtz opened this issue · 6 comments

ckuhtz commented

Documentation Issue

Set-NetFirewallHyperVVMSetting -Name ‘{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}’ -DefaultInboundAction Allow

to allow inbound fails with:

PS C:\WINDOWS\system32> Set-NetFirewallHyperVVMSetting -Name {40E0AC32-46A5-438A-A0B2-2B479E8F2E90} -DefaultInboundAction Allow
Set-NetFirewallHyperVVMSetting : No MSFT_NetFirewallHyperVVMSetting objects found with property 'Name' equal to
'40E0AC32-46A5-438A-A0B2-2B479E8F2E90'. Verify the value of the property and retry.
At line:1 char:1

  • Set-NetFirewallHyperVVMSetting -Name {40E0AC32-46A5-438A-A0B2-2B479E8 ...
  •   + CategoryInfo          : ObjectNotFound: (40E0AC32-46A5-438A-A0B2-2B479E8F2E90:String) [Set-NetFirewallHyperVVMSe
     tting], CimJobException
      + FullyQualifiedErrorId : CmdletizationQuery_NotFound_Name,Set-NetFirewallHyperVVMSetting
    
    

in an elevated PowerShell prompt.

Link to documentation page

https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking

Suggested Improvements

What is the correct instruction here? How do you find out what the VMCreatorId is?

The answer is easy:

compare what is copied from the Docs with what arrives in the powershell:

Copy:
Set-NetFirewallHyperVVMSetting -Name ‘{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}’ -DefaultInboundAction Allow
Arrive:
Set-NetFirewallHyperVVMSetting -Name {40E0AC32-46A5-438A-A0B2-2B479E8F2E90} -DefaultInboundAction Allow

In the docs is the wrong type of apostrophe used. Compare: https://en.wikipedia.org/wiki/Apostrophe
Be aware that the second codeline is also affected (LEFT DOUBLE QUOTATION MARK).

Therefore add the ' manually. I will open a ticket to fix the docs.