mirror of
https://github.com/lemeow125/Notes.git
synced 2024-11-17 04:09:26 +08:00
Compare commits
4 commits
06f212838e
...
2ed1c92675
Author | SHA1 | Date | |
---|---|---|---|
2ed1c92675 | |||
16842d6af1 | |||
06b79f7187 | |||
b11d8ea41c |
2 changed files with 10 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
|||
### Command Snippets
|
||||
- [Ansible Snippets](Ansible%20Snippets.md)
|
||||
- [Bash Commands](Bash%20Commands.md)
|
||||
- [Docker - Miscellaneous](Docker%20-%20Miscellaneous.md)
|
||||
- [Docker Run](Docker%20Run.md)
|
||||
- [Windows Snippets](Windows%20Snippets.md)
|
8
docs/Command Snippets/Windows Snippets.md
Normal file
8
docs/Command Snippets/Windows Snippets.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
- Get IP addresses of Hyper-V VMs
|
||||
```powershell
|
||||
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)`
|
||||
```powershell
|
||||
Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)'} | Set-NetIPInterface -Forwarding Enabled
|
||||
```
|
Loading…
Reference in a new issue