Windows的CMD的NET命令net start , net stop …

微软官方文档—Net Commands On Operating Systems

在Windows安装MySQL时

  • 可以用 net start mysql 启动MySQL服务
  • 可以用 net stop mysql 停止MySQL服务

于是想想了解一下 net 命令
对比 Linux的启动停止MySQL服务

Windows Linux
启动MySQL服务 net start mysql systemctl start mysql
停止MySQL服务 net stop mysql systemctl stop mysql
启用MySQL服务 systemctl enable mysql
禁用MySQL服务 systemctl disable mysql
重启MySQL服务 systemctl restart mysql

探索 cmd 的 net
在控制台输入net

C:\Users\A>net
此命令的语法是:NET[ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |STATISTICS | STOP | TIME | USE | USER | VIEW ]

输入 net help

C:\Users\A>net help
此命令的语法是:NET HELP
command-或-
NET command /HELP可用的命令为:NET ACCOUNTS             NET HELPMSG              NET STATISTICSNET COMPUTER             NET LOCALGROUP           NET STOPNET CONFIG               NET PAUSE                NET TIMENET CONTINUE             NET SESSION              NET USENET FILE                 NET SHARE                NET USERNET GROUP                NET START                NET VIEWNET HELPNET HELP NAMES 解释 NET HELP 语法行中的不同类型名称。NET HELP SERVICES 列出可以启动的一些服务。NET HELP SYNTAX 解释如何读取 NET HELP 语法行。NET HELP 命令 | MORE 显示帮助,一次显示一屏。

输入 net help start

此命令的语法是:NET START
[service]NET START 列出正在运行的服务。service   可以包括以下服务之一:BROWSERDHCP CLIENTEVENTLOGFILE REPLICATIONNETLOGONPLUG AND PLAYREMOTE ACCESS CONNECTION MANAGERROUTING AND REMOTE ACCESSRPCSSSCHEDULESERVERSPOOLERTCP/IP NETBIOS HELPERUPSWORKSTATION在命令提示符处键入时,两个或更多单词的服务名称
必须括在引号中。例如,NET START "DHCP Client"
启动 DHCP Client 服务。NET START 还可以启动非 Windows 提供的服务。NET HELP 命令 | MORE 显示帮助,一次显示一屏。

输入net help stop

此命令的语法是:NET STOP
serviceNET STOP 停止 Windows 服务。停止服务将取消该服务使用的任何网络连接。
此外,某些服务依赖于其他服务。停止一个
服务可能会停止其他服务。某些服务无法停止。service   可以是以下服务之一:BROWSERDHCP CLIENTFILE REPLICATIONNETLOGONREMOTE ACCESS CONNECTION MANAGERROUTING AND REMOTE ACCESSSCHEDULESERVERSPOOLERTCP/IP NETBIOS HELPERUPSWORKSTATIONNET STOP 还可以停止非 Windows 提供的服务。NET HELP 命令 | MORE 显示帮助,一次显示一屏。

net accounts: 查询账户相关信息。

net user : 查询计算机下所有的用户名。

net use: 查看当前计算机的网络连接;

微软官方文档—Net Commands On Operating Systems

Net Commands On Operating Systems
Article
09/24/2021
3 minutes to read
3 contributors

This article provides some information about Net Commands on Operating Systems.

Applies to: Windows Server 2012 R2
Original KB number: 556003

This article was written by Nirmal Sharma, Microsoft MVP.

Summary
The following knowledgebase will explain the uses of Net commands in Windows Operating Systems.

More information
Net Commands On Windows Operating Systems

The following Net Commands can be used to perform operations on Groups, users, account policies, shares, and so on.

NET
ACCOUNTS
COMPUTER
CONFIG
CONTINUE
FILE
GROUP
HELP
HELPMSG
LOCALGROUP
NAME
PAUSE
PRINT
SEND
SESSION
SHARE
START
STATISTICS
STOP
TIME
USE
USER
VIEW

The “Net Accounts” command is used to set the policy settings on local computer, such as Account policies and password policies. This command can’t be used on domain controller. This command is only used on local computer.

When you type Net Accounts, you will see the default settings of the Account Lockout policy and Password Policy in local computer show as:

Output

Copy
Force user logoff how long after time expires?: Never
Minimum password age (days): 1
Maximum password age (days): 90
Minimum password length: 8
Length of password history maintained: 5
Lockout threshold: 4
Lockout duration (minutes): 4
Lockout observation window (minutes): 4
Computer role: WORKSTATION
The above settings displayed as per the role of the computer. If computer is joined to a domain, the domain settings will take effect and only the settings coming from domain will be displayed. The rest settings will be the local settings if it’s not coming from the Domain GPO.

You can change the following use the following options in Net Accounts option:

Console

Copy
NET ACCOUNTS
[/FORCELOGOFF:{minutes | NO}]
[/MINPWLEN:length]
[/MAXPWAGE:{days | UNLIMITED}]
[/MINPWAGE:days]
[/UNIQUEPW:number] [/DOMAIN]
Two conditions are required in order for options used with NET ACCOUNTS to take effect:

/FORCELOGOFF:{minutes | NO} Sets the number of minutes a user has before being forced to log off when the account expires or valid logon hours expire. NO, the default, prevents forced logoff.

/MINPWLEN:length Sets the minimum number of characters for a password. The range is 0-14 characters; the default is six characters.

/MAXPWAGE:{days | UNLIMITED} Sets the maximum number of days that a password is valid. No limit is specified by using UNLIMITED. /MAXPWAGE can’t be less than /MINPWAGE. The range is 1-999; the default is 90 days.

/MINPWAGE:days Sets the minimum number of days that must pass before a user can change a password. A value of zero sets no minimum time. The range is 0-999; the default is zero days. /MINPWAGE can’t be more than /MAXPWAGE.\

/UNIQUEPW:number Requires that a user’s passwords be unique through the specified number of password changes. The maximum value is 24.

/DOMAIN Performs the operation on a domain controller of the current domain. Otherwise, the operation is performed on the local computer.

操作系统上的网络命令

09/24/2021
阅读时长 3 分钟
3 个贡献者

本文提供有关操作系统上的 Net 命令的一些信息。

适用于:视窗服务器 2012 R2
原始 KB 数: 556003

本文由微软MVP尼尔马尔·夏尔马撰写。

总结
以下知识库将说明网络命令在 Windows 操作系统中的用法。

更多信息
操作系统上的网络命令

以下 Net 命令可用于对组、用户、帐户策略、共享等执行操作。


帐户 计算机配置 继续 文件组 帮助 帮助MSG
本地组
名称
暂停
打印
发送
会话
共享
开始
统计信息
停止
时间
使用
用户
视图

“网络帐户”命令用于设置本地计算机上的策略设置,如帐户策略和密码策略。此命令不能在域控制器上使用。此命令仅在本地计算机上使用。

当您键入网络帐户时,您将看到本地计算机中的帐户锁定策略和密码策略的默认设置显示为:

输出

复制
Force user logoff how long after time expires?: Never
Minimum password age (days): 1
Maximum password age (days): 90
Minimum password length: 8
Length of password history maintained: 5
Lockout threshold: 4
Lockout duration (minutes): 4
Lockout observation window (minutes): 4
Computer role: WORKSTATION
上述设置根据计算机的角色显示。如果计算机已加入域,则域设置将生效,并且仅显示来自域的设置。其余设置将是本地设置(如果它不是来自域 GPO)。

您可以使用网络帐户选项中的以下选项更改以下内容:

安慰

复制
NET ACCOUNTS
[/FORCELOGOFF:{minutes | NO}]
[/MINPWLEN:length]
[/MAXPWAGE:{days | UNLIMITED}]
[/MINPWAGE:days]
[/UNIQUEPW:number] [/DOMAIN]
要使与 NET 帐户一起使用的选项生效,需要满足两个条件:

/FORCELOGOFF:{minutes | NO}设置当帐户过期或有效登录小时数过期时,用户在被强制注销之前拥有的分钟数。默认值 NO 可防止强制注销。

/MINPWLEN:length设置密码的最小字符数。范围是 0-14 个字符;默认值为六个字符。

/MAXPWAGE:{days | UNLIMITED}设置密码有效的最大天数。使用“无限制”未指定任何限制。/最大点击率不能小于 /最小水位。范围是1-999;默认值为 90 天。

/MINPWAGE:days设置用户更改密码之前必须经过的最小天数。值为零不设置最小时间。范围是 0-999;默认值为零天。/最小值不能超过 /最大最小值。

/UNIQUEPW:number要求用户的密码通过指定数量的密码更改是唯一的。最大值为 24。

/DOMAIN在当前域的域控制器上执行操作。否则,将在本地计算机上执行该操作。

Windows的CMD的NET命令net start , net stop ...相关推荐

  1. Windows批处理(cmd/bat)常用命令

    Windows批处理(cmd/bat)常用命令 一.总结 一句话总结: 1.批量处理图片的方式? PS批处理是基于强大的图片编辑软件Photoshop的,用来批量处理图片的脚本: 2.大量的重复的操作 ...

  2. Windows批处理(cmd/bat)常用命令教程

    Windows批处理(cmd/bat)常用命令教程 简单详细,建议收藏 常见问题: 1.如果你自己编写的.bat文件,双击打开,出现闪退 2.批处理.bat 文件中输出中文乱码 解决方法在文章末尾! ...

  3. Windows批处理 cmd/bat 常用命令教程

    Windows批处理(cmd/bat)常用命令教程 简单详细,建议收藏 常见问题: 1.如果你自己编写的.bat文件,双击打开,出现闪退 2.批处理.bat 文件中输出中文乱码 解决方法在文章末尾! ...

  4. windows下cmd清屏命令cls

    windows下cmd清屏命令cls

  5. [Window] Windows批处理(cmd/bat)常用命令小结

    目录 Windows批处理(cmd/bat)常用命令小结 什么是批处理? 批处理命令简介 批处理符号简介 常用DOS命令 Windows Batch 常用命令 Windows批处理(cmd/bat)常 ...

  6. windows系统cmd和Powershell命令窗口使用问题解决方案

    关于在windows系统cmd和Powershell命令窗口使用问题解决方案 在文件夹里打开cmd窗口 电脑按键shift+鼠标右键 点击命令窗口 有些电脑会自己因为微软使用Powershell命令是 ...

  7. Windows系统CMD下常用命令

    命令    功能 ASSOC    显示或修改文件扩展名关联. ATTRIB    显示或更改文件属性. BREAK    设置或清除扩展式 CTRL+C 检查. BCDEDIT    设置启动数据库 ...

  8. windows下cmd常用的命令

    2019独角兽企业重金招聘Python工程师标准>>> windows下常用的命令指示行: windows下 CMD比较常见的命令1. gpedit.msc-----组策略 2. s ...

  9. bat fc命令_什么是批处理?Windows批处理(cmd/bat)常用命令合集

    什么是批处理?批处理(Batch),也称为批处理脚本.顾名思义,批处理就是对某对象进行批量的处理,通常被认为是一种简化的脚本语言,它应用于DOS和Windows系统中.批处理文件的扩展名为bat .目 ...

  10. Windows的cmd命令提示符窗口命令大全

    使用电脑工作的小伙伴们,使用cmd命令有时候会让我们的工作方便很多哟 但是cmd命令也太多了,记太多会很累的呢,那么,就一点一点来吧! (在cmd命令窗口输入和在运行里输入都可以) 第一部分: win ...

最新文章

  1. python注释#、Ctrl+/
  2. 并查集(Union-Find)算法介绍
  3. mpi tcp连接报错_MPI分布式编程 --3.OpenMPI多节点运行报错
  4. GitHub轻松阅读微服务实战项目流程详解【第一天:数据库表设计及其环境搭建、项目运行】
  5. Deep learning:十九(RBM简单理解)
  6. Valgrind ---内存调试,内存泄漏检测以及性能分析的软件开发工具
  7. 基于verilog的万年历设计
  8. getAndIncrement中使用cas
  9. Sharepoin学习笔记 —架构系列--02 Sharepoint的处理(Process)与执行模型(Trust Model) 1
  10. 「超级右键」Mac必备的一款软件,新手get!
  11. 批处理 无效驱动器规格_电脑维修之硬盘驱动器的常见故障判断
  12. 乒乓球(Table Tennis)
  13. python参考手册 第二章
  14. MapReduce实现商品推荐算法(用户购买向量*商品同现矩阵)
  15. 形式化方法 Assignment 4: Proof for predicate logic
  16. 亿级视频内容如何实时更新?
  17. 关于为什么RAID5往往掉一个盘后第二个盘也立刻挂掉的原因分析
  18. 计算机毕业设计 SSM同学录管理系统 同学聚会报名系统 在线聚会报名系统Java Vue MySQL数据库 远程调试 代码讲解
  19. 格式工厂找不到qlv文件无法添加qlv文件 怎么办 解决方法
  20. 超详细的VMware虚拟机安装Linux图文教程保姆级

热门文章

  1. 锐浪报表 Grid++Report 子报表 Delphi
  2. Ansys模态计算结果图片批量导出命令流
  3. 领域驱动(自己理解)
  4. 【小样本基础】「MAML」 VS 「Model-Pre-training」MAML与预训练的区别
  5. 前端/后端、前台/后台的英文翻译选择
  6. 庄子:谁知南华秋水意?
  7. 图片选择器ImagePicker
  8. 土建中级工程师考试用书电子版_真的!2020年湖南土建中级职称考试用书是没有指定的教材?...
  9. 2018年第九届蓝桥杯决赛JAVA B 题解(全)
  10. 使用prewitt算子分割白纸黑字图像(Matlab)