July 30, 2013

Useful Hyper-V Powershell Commands

Hyper-V Specific:

Get-VMSwitch – Shows Hyper-V Virtual Switches

Get-VMSwitch Name | fl Property * – Shows the details of the virtual switch.

New-VMSwitch –Name Name –NetAdapterName Name – Creates an external Hyper-V switch using the network interface name.

Networking:

Get-NetAdapter – Shows the list of network adapters.

Firewall:

Get-NetFirewallRule | ft Name, Enabled – Lists all firewall rules and whether they are enabled or not.

Set-NetFirewallRule –Name Name Enabled True/False – Enables or disabled a firewall rule.

Useful Firewall Rules to Open:

FPS-ICMP4-ERQ-In – ICMP Ping

RVM-VDS-In-TCP – Remote Volume Management / Disk Management