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

netsh set

· 52CE 我爱测

The netsh set command targets local or remote devices to perform network configuration tasks in Windows.

The netsh set command allows administrators to specify the target machine for subsequent network configuration tasks, enabling operations on either local or remote systems. If a machine name isn't specified, the local machine is used. A username and password can't be used to connect to the local machine.

Syntax

netsh set machine [name=]<string> [user=][[DomainName\]UserName] [pwd=][Password | *]

Parameters

Parameter Description
<name> Specifies the device name or network address of the machine on which you want to perform actions.
<user> Provides the username credentials required to authenticate and connect to the remote machine. If your network uses a domain, specify the username in the format DomainName\UserName.
<pwd> Supplies the password associated with the specified user account. If you enter an asterisk (*) instead of a password, you're prompted to input the password interactively for added security.

Examples

To specify a target machine using its IP address in a domain environment where the password is prompted, run the following command:

netsh set machine name=192.168.1.10 user=DOMAIN\Admin pwd=*

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 07/29/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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