批处理脚本中的网络命令-ag捕鱼王app官网

批处理脚本中的网络命令

作者:迹忆客 最近更新:2024/03/15 浏览次数:

在本文中,我们将讨论 batch 中用于联网的各种命令。我们将通过必要的示例和解释看到这些命令的使用。


批处理 net accounts 命令

通过此命令,你可以查看计算机的当前限制和密码。现在我们将在我们的 cmd 上运行这个命令,看看输出会变成什么。

net accounts

运行命令后,你将看到如下所示的输出。你可以查看有关你的网络的所有必要信息。

输出:

force user logoff how long after time expires?:       never
minimum password age (days):                          0
maximum password age (days):                          42
minimum password length:                              0
length of password history maintained:                none
lockout threshold:                                    never
lockout duration (minutes):                           30
lockout observation window (minutes):                 30
computer role:                                        workstation
the command completed successfully.

批处理 net config 命令

该命令用于显示当前服务器和工作组的设置。让我们运行这个命令,看看会发生什么。

net config

执行命令后,你将获得以下输出。

输出:

the following running services can be controlled:
   server
   workstation

批处理 net computer 命令

此命令的主要目的是删除连接到 windows 域控制器的计算机。命令的一般格式是 net computer \\computername {/add | /del}

让我们看一个例子。

net computer \\mycomputer /add

批处理 net user 命令

这是网络中最重要的命令,因为此命令可以查看、添加、删除或修改用户帐户。要查看特定用户的详细信息,你需要遵循这种格式 net user user_name

让我们看这个命令的一个基本示例。

net user

执行命令后,你会看到:

输出:

user accounts for \\desktop-nrta4bb
-------------------------------------------------------------------------------
administrator            defaultaccount           guest
author                   alen                    wdagutilityaccount
the command completed successfully.

批处理 net stop/start 命令

该命令主要用于启动或停止特定的网络服务。该命令的一般格式是 net stop/start service_name


批处理 net statistics 命令

假设你想查看你的服务器或工作站的网络统计信息;你需要使用这个命令。让我们看一个使用此命令的示例。

net statistics workstation

你将获得以下输出。

workstation statistics for \\desktop-nrta4bb
statistics since 6/3/2022 7:55:04 am
  bytes received                               13524
  server message blocks (smbs) received        4
  bytes transmitted                            12006
  server message blocks (smbs) transmitted     0
  read operations                              0
  write operations                             0
  raw reads denied                             0
  raw writes denied                            0
  network errors                               0
  connections made                             0
  reconnections made                           0
  server disconnects                           0
  sessions started                             0
  hung sessions                                0
  failed sessions                              0
  failed operations                            0
  use count                                    4
  failed use count                             0
the command completed successfully.

批处理 net use 命令

此命令连接或断开计算机与共享资源的连接。此外,此命令可以显示有关现有连接的必要信息。

该命令的一般格式是 net use c: \\yourcomputer\test

上一篇:

下一篇:

转载请发邮件至 1244347461@qq.com 进行申请,经作者同意之后,转载请以链接形式注明出处

本文地址:

相关文章

发布时间:2024/03/15 浏览次数:75 分类:编程语言

本教程将展示我们如何在批处理脚本中包含或添加注释。

发布时间:2024/03/15 浏览次数:186 分类:编程语言

本教程将展示在批处理脚本中使用 pause 关键字。

发布时间:2024/03/15 浏览次数:306 分类:编程语言

本教程教授如何使用 bat 文件删除文件夹及其内容。

发布时间:2024/03/15 浏览次数:96 分类:编程语言

本教程将展示我们如何在批处理脚本中使用 exit 命令。

发布时间:2024/03/15 浏览次数:205 分类:编程语言

本教程将教授批处理脚本中的颜色。

发布时间:2024/03/15 浏览次数:118 分类:编程语言

本教程将讨论批处理脚本中 if else 条件的结构。

发布时间:2024/03/15 浏览次数:148 分类:编程语言

本教程将了解我们如何使用批处理脚本发送邮件。

发布时间:2024/03/15 浏览次数:192 分类:编程语言

本教程将讨论如何在批处理脚本中声明数组。

扫一扫阅读全部技术教程

社交账号
  • https://www.github.com/onmpw
  • qq:1244347461

最新推荐

教程更新

热门标签

扫码一下
查看教程更方便
网站地图