Notes/docs/Command Snippets/Windows Snippets.md
Keannu Bernasol 06b79f7187 vault backup: 2024-10-28 23:11:46
Affected files:
docs/Command Snippets/Windows Snippets.md
2024-10-28 23:11:46 +08:00

481 B

  • Get IP addresses of Hyper-V VMs
get-vm | ?{$_.State -eq "Running"} | select -ExpandProperty networkadapters | select vmname, macaddress, switchname, ipaddresses | ft -wrap -autosize
  • Enable traffic forwarding from WSL to Hyper-V vEthernet (WSL) -> vEthernet (Default Switch)
Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)'} | Set-NetIPInterface -Forwarding Enabled