大网数据广告活动
Windows排障命令

netsh nlm

· 52CE 我爱测

The netsh nlm command manages the Network Location Manager (NLM) settings to override network connection quality classification in Windows.

The netsh nlm command allows admins to manage the Network Location Manager (NLM) settings and behavior by manually overriding how Windows classifies the network connection quality.

Syntax

netsh nlm [ dump | enum | help | query | set | show | ?]
netsh nlm enum <connection> <network>
netsh nlm query all
netsh nlm set connectionquality [<guid> [good|bad|ignore]]
netsh nlm show <connectivity> <cost>

Parameters

Command Description
nlm dump Creates a script containing the current context configuration. The script can be saved to a file and used to restore settings if they're altered or need to be replicated on another system.
nlm enum connection - Enumerates the current INetworkConnection objects. network - Enumerates the current INetwork objects.
nlm query all Queries all network states from all supported services and writes to a file. A file path and name must be specified to save results.
nlm set connectionquality Manually sets the connection quality of a network interface, overriding the connection quality classification by the Network classifier. guid - Is the interface GUID. good - Forces Windows to consider the specified network interface’s connection quality as stable and reliable. bad - Forces Windows to consider the specified network interface’s connection quality as unreliable where certain features might disable themselves, or services might limit their operations. ignore - Forces Windows to not override its own assessment. Windows determines the connection quality by itself, based on its normal detection algorithms (reverting automatic classification).
nlm show connectivity - Displays the current connectivity state from the INetworkListManager. cost - Displays the current cost from the INetworkCostManager.
help or ? Displays a list of commands and their descriptions in the current context.

Examples

To enumerate the current network connections, run the following command:

netsh nlm enum connection

To query all network states and save the results to a file, run the following command:

netsh nlm query all <Filepath\Filename>

To manually set the connection quality of a network interface to "good", run the following command:

netsh nlm set connectionquality <My_GUID> good

To display the current connectivity state, run the following command:

netsh nlm show connectivity

See also

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/09/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。