Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ckuhtz opened this issue Dec 8, 2023 · 6 comments
Assignees

Comments

@ckuhtz
Copy link

ckuhtz commented Dec 8, 2023

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?

@ghost
Copy link

ghost commented Feb 14, 2024

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.

@cotneit
Copy link

cotneit commented Mar 20, 2024

@leolerbssiedle have you actually tried it?

Replacing ‘{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}’ with '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' doesn't make a difference.

@Yunuuuu
Copy link

Yunuuuu commented Mar 23, 2024

The same problem, I don't copy code from the document but learn step by step from:
https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall

Set-NetFirewallHyperVVMSetting cannot match the name.

@gscofano-uff
Copy link

gscofano-uff commented Apr 1, 2024

Exact same issue here.

Update: just fixed it.

I had already made sure that I was running Windows with a version superior than 22H2 (mine was 23H2) and WSL 2 and even so I was having this issue with WSL. I had already tried to shutdown the WSL and open it again, with no success. I fixed by updating the WSL with the following command:

PS C:\Users\user> wsl --update

When I started the WSL again, it had the same network interfaces available in the host OS.

@feng-yifan
Copy link

The same problem, I don't copy code from the document but learn step by step from: https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall

Set-NetFirewallHyperVVMSetting cannot match the name.

I tried command like this Get-NetFirewallHyperVRule -VMCreatorId '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}', but it told me this VMCreator not exist

@feng-yifan
Copy link

try run wsl --update may solve your problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants