标签:批量修改客户端网卡配置
$ComputerName = hostnameFunction Change-NetworkAdapterSettings()
{
Get-NetAdapterAdvancedProperty -DisplayName 首选频带 | set-NetAdapterAdvancedProperty -RegistryValue 2
}
Function UPdate-REGSettings()
{
Get-ChildItem $regPath| foreach {
? $product =? Get-ItemProperty $_.PSPath
if($product.NetType -eq ‘WLAN‘ )
{
Set-ItemProperty $product.PSPath -Name "RoamingPreferredBandType" -Value 2
}
}
}
if (($OS_Version -like "6.*"))
{
write-host "Computer Name:"$ComputerName
write-host "OS:Windows 7"
UPdate-REGSettings
}
elseif ($OS_Version -like "10.*")
{
write-host "OS:Windows 10"
Change-NetworkAdapterSettings
}
标签:批量修改客户端网卡配置
原文地址:http://blog.51cto.com/unicom/2095398