#开启DHCP协议
Get-NetIPInterface -Dhcp Disabled|Set-NetIPInterface -Dhcp Enabled
#开启本机上所有博通网卡的DHCP
Get-WmiObject -Class win32_networkadapterconfiguration -Filter "description like 'Broadcom%'" |Invoke-WmiMethod -Name EnableDHCP
#在接口名称为 ‘WLAN’ 启用 DHCP
netsh interface ipv4 set address name="WLAN" source=DHCP
ipconfig /renew wlan #执行刷新操作: