WIN: Setting up the firewall on Hyper-V core server

To add the rules to the firewall needed to manage HyperV, you need to add the following in cmd File sharing

  1 netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes

Disk management

  1 netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes

Remote desktop

  1 netsh advfirewall firewall set rule group="remote desktop" new enable=yes

Disk management (on both sides add in Powershell):

  1 Set-NetFirewallRule -Name "RVM-VDS-In-TCP" -Enabled True -Profile Any
  2 Set-NetFirewallRule -Name "RVM-VDSLDR-In-TCP" -Enabled True -Profile Any
  3 Set-NetFirewallRule -Name "RVM-RPCSS-In-TCP" -Enabled True -Profile Any

Sending files via admin center

  1 New-NetFirewallRule -DisplayName "__Allow_File_UploadDownload" -Direction Inbound -LocalPort 445 -Protocol TCP -Action Allow -RemoteAddress <Adres kompa z któego idzie plik>