1. 网络适配器管理
WAC → 选择服务器 → 网络
1.1 查看网络适配器
PowerShell - 网络适配器信息
# 查看所有网络适配器
Get-NetAdapter | Select-Object Name, InterfaceDescription, Status, LinkSpeed, MacAddress
# 查看详细配置
Get-NetIPConfiguration | Format-List
# 禁用/启用适配器
Disable-NetAdapter -Name "Ethernet1" -Confirm:$false
Enable-NetAdapter -Name "Ethernet1"
1.2 NIC 组合(Teaming)
PowerShell - NIC 组合
# 创建 NIC 组合
New-NetLbfoTeam -Name "Team-Prod" `
-TeamMembers "Ethernet0", "Ethernet1" `
-TeamingMode SwitchIndependent" `
-LoadBalancingAlgorithm Dynamic"
# 查看组合状态
Get-NetLbfoTeam Team-Prod"
2. IP 地址配置
PowerShell - IP 地址配置
# 设置静态 IP
New-NetIPAddress -InterfaceAlias "Ethernet0" `
-IPAddress "192.168.10.248" `
-PrefixLength 24 `
-DefaultGateway "192.168.10.1"
# 设置 DNS
Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" `
-ServerAddresses "192.168.10.254", "192.168.10.253"
# 切换为 DHCP
Set-NetIPInterface -InterfaceAlias "Ethernet0" -Dhcp Enabled"
# 添加辅助 IP
New-NetIPAddress -InterfaceAlias "Ethernet0" `
-IPAddress "192.168.10.149" -PrefixLength 24 -SkipAsSource $true
3. 防火墙规则管理
WAC → 选择服务器 → 防火墙
3.1 图形界面管理防火墙
1
选择服务器 → 防火墙 → 查看当前规则列表
2
筛选:入站规则/出站规则 → 已启用/已禁用
3
点击 新建入站规则 → 选择类型 → 配置端口/IP → 允许/阻止
3.2 PowerShell 管理防火墙
PowerShell - 防火墙规则管理
# 允许 WinRM(WAC 依赖)
Enable-NetFirewallRule -DisplayGroup Windows Remote Management"
# 允许 ICMP(Ping)
Enable-NetFirewallRule -DisplayName File and Printer Sharing (Echo Request - ICMPv4-In)"
# 新建自定义规则:允许 TCP 8080
New-NetFirewallRule -DisplayName "Allow-WebApp-8080" `
-Direction Inbound" -Protocol TCP" -LocalPort 8080 -Action Allow"
# 阻止特定 IP 访问
New-NetFirewallRule -DisplayName "Block-BadIP" `
-Direction Inbound" -RemoteAddress 10.0.0.99" -Action Block"
4. 网络诊断
PowerShell - 通过 WAC 远程诊断
# 测试网络连通性
Test-NetConnection -ComputerName DC01 -Port 53
# 追踪路由
tracert DC01.iehang.cn
# DNS 解析测试
Resolve-DnsName WAC01.iehang.cn
# 查看路由表
Get-NetRoute | Select-Object DestinationPrefix, NextHop, RouteMetric
5. 常见问题
Q1:WAC 无法连接目标服务器的 WinRM
① 目标服务器执行 Enable-PSRemoting -Force ② 防火墙放行 WinRM:Enable-NetFirewallRule -DisplayGroup "Windows Remote Management" ③ 检查 WinRM 监听:winrm enumerate winrm/config/listener ④ 如果跨网段,检查 5985/5986 端口是否可达