有沒有辦法查看網絡適配器的高級屬性,如Windows 2008 R2的Get-NetAdapterAdvancedProperty?查看網絡適配器的高級屬性,如Get-NetAdapterAdvancedProperty
2
A
回答
1
0
我在使用/禁用JumboPackets時遇到了與Windows Server 2008相同的問題。我已經寫過這個腳本。它在我的測試虛擬機上工作正常。
在生產中使用它之前,請在任何測試機器上進行測試。
$TargetKeys = Get-ChildItem -Path 'HKLM:\SYSTEM\ControlSet001\Control\Class\' -Recurse -ErrorAction SilentlyContinue
ForEach($TestKey In $TargetKeys)
{
$KeyName = $TestKey.Name.Replace("HKEY_LOCAL_MACHINE","HKLM:")
$SubKeys = Get-ChildItem -Path $KeyName -ErrorAction SilentlyContinue
ForEach($SubKey In $SubKeys)
{
If($SubKey -ne $null -or $SubKey -ne '')
{
$ErrorActionPreference = 'SilentlyContinue'
$ItemKey = $SubKey.Name.Replace("HKEY_LOCAL_MACHINE","HKLM:")
$PropNames = ForEach($PropName In (Get-ItemProperty -Path $ItemKey -ErrorAction SilentlyContinue | GM -MemberType Properties -ErrorAction SilentlyContinue | Select Name)) { $PropName.Name }
If($PropNames -contains '*JumboPacket')
{
# Set to 9014 for enabling and 1514 for disabling
Set-ItemProperty -Path $ItemKey -Name '*JumboPacket' -Value 9014 -ErrorAction SilentlyContinue
If($?)
{
Write-Host "'Jumbo Packets' enabled successfully for Network card." -ForegroundColor Green
}
Else
{
Write-Host "Error while enabling 'Jumbo Packets' for Network card." -ForegroundColor Red
}
}
$ErrorActionPreference = 'Continue'
}
}
}
相關問題
- 1. 區分VMware網絡適配器與物理網絡適配器 - 或 - 檢測虛擬網絡適配器
- 2. 更改無線網絡適配器無線模式屬性
- 3. windows網絡適配器
- 4. 列出網絡適配器
- 5. Windows腳本,設置網絡連接的高級屬性
- 6. 通過代碼的網絡驅動程序高級屬性
- 7. android中的高級firebase適配器
- 8. 如何在修改網絡適配器屬性時保證獨佔訪問
- 9. 任何查看網絡會話屬性的工具?
- 10. 如何通過網絡適配器查找Linux名稱空間?
- 11. 使用所需的網絡適配器撥打網絡服務
- 12. 提高網絡服務器的性能
- 13. 高性能在瀏覽器的網絡
- 14. HttpURLConnection&使用特定網絡適配器
- 15. 網絡適配器批處理標識
- 16. NIC卡和網絡適配器?
- 17. 在ubuntu上設置網絡適配器
- 18. 點網裝配查看器?
- 19. TFS高級文件歷史查看器
- 20. 的Android回收站查看適配器
- 21. 用於TableView的JavaFX屬性適配器
- 22. SAP接收適配器高可用性
- 23. 如何從網絡服務器查看我的播放網站?
- 24. 如何將網絡適配器添加到Linux機器?
- 25. 如何在Windows中爲高級網絡適配器屬性設置巨型數據包和接收/傳輸緩衝區?
- 26. 如何確定PdhExpandWildCardPath結果中的主網絡適配器?
- 27. 如何強制特定網絡適配器上的流量
- 28. 如何確定網絡適配器是否是無線的?
- 29. 如何限制Virtual Box中的網絡適配器數量?
- 30. 如何獲得網絡適配器的IP地址
如果您正在尋找的功能,你可以升級到服務器上的PowerShell 4.0 2008年 – Matt 2014-09-03 11:24:46
升級到PowerShell的4.0似乎沒有添加網絡適配器的cmdlet(試圖在Windows 7)。 [Get-NetAdapterAdvancedProperty](https://technet.microsoft.com/en-us/library/jj130901%28v=wps.630%29.aspx)的文檔明確針對Windows Server 2012和Windows 8。 – Kim 2015-12-02 09:28:06