#Enable SMB Server/Client
Enable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol" -All

#Enable Hyper-V
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

#Allow Remote Desktop connections
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

#Set Remote Desktop rule in firewall
netsh advfirewall firewall set rule group="remote desktop" new enable=yes

#Turn on file and printer sharing
Set-NetFirewallRule -DisplayGroup "File And Printer Sharing" -Enabled True -Profile Any

#Turn on network discovery
Set-NetFirewallRule -DisplayGroup "Network Discovery" -Enabled True -Profile Any