# 查看当前远程桌面防火墙状态 Get-NetFirewallRule -Name RemoteDesktop* | select DisplayName,Direction,Enabled # 启用防火墙规则 Get-NetFirewallRule -Name RemoteDesktop* | Set-NetFirewallRule -Enabled true
PowerShell 防火墙开放远程桌面
0
# 查看当前远程桌面防火墙状态 Get-NetFirewallRule -Name RemoteDesktop* | select DisplayName,Direction,Enabled # 启用防火墙规则 Get-NetFirewallRule -Name RemoteDesktop* | Set-NetFirewallRule -Enabled true