命令行修改本地组策略_通过命令行从Windows进行本地组管理

命令行修改本地组策略

命令行修改本地组策略

Modern operating systems like Linux, Windows uses groups to manage user rights more flexible way. Users generally assigned to the groups to use groups related privileges like Local Admin , Remote Desktop User , Power User , etc. In this tutorial we will look how manage manage local user groups in Windows operating systems.

像Linux这样的现代操作系统,Windows使用组来更灵活地管理用户权限。 通常分配给这些组的用户可以使用与组相关的特权,例如Local AdminRemote Desktop UserPower User等等。在本教程中,我们将研究如何在Windows操作系统中通过Manage管理本地用户组。

帮帮我 (Help)

Help and syntax information about local groups can be printed with the following command.

可以使用以下命令来打印有关本地组的帮助和语法信息。

$ net localgroup /?
Help localgroup
Help localgroup
帮助localgroup

清单群组 (List Groups)

Local groups can be listed with net localgroup command. This will list local groups not domain groups.

可以使用net localgroup命令列出本地组。 这将列出本地组而不是域组。

$ net localgroup
List Groups
List Groups
清单群组

As we can see groups are listed line by line. These groups are default groups those came with Windows Operating System.

如我们所见,组是逐行列出的。 这些组是Windows操作系统随附的默认组。

  • Administrators is most privileged groups used for administration

    Administrators是用于Administrators的最特权组

  • Users is least privileged user used for normal users.

    Users是用于普通用户的最低特权用户。

创建组 (Create Group)

Windows local groups can be create with /ADD option easily. We will create a local group named Developers in this example.

Windows本地组可以使用/ADD选项轻松创建。 在此示例中,我们将创建一个名为Developers的本地组。

$ net localgroup Developers /ADD
Create Group
Create Group
创建组

We get the message of successful group creation.

我们收到成功创建群组的信息。

删除群组 (Delete Group)

Local groups can be removed if we have no need for them. We will use /DELETE option to remove group.

如果我们不需要本地组,则可以将其删除。 我们将使用/DELETE选项删除组。

$ net localgroup Developers /DELETE

列出组用户 (List Group Users)

One of the most used option is listing given group users. We need to provides the local group name for its users. In this example we will list local group named Administrators users.

最常用的选项之一是列出给定的组用户。 我们需要为其用户提供本地组名称。 在此示例中,我们将列出名为Administrators users的本地组。

$ net localgroup "Administrators"
List Group Users
List Group Users
列出组用户

As we can see the local groups alias and comment about the group is printed too. Administrators local group have two users named Administrator and ismail . Do not confuse user Administrator with the local group Administrators they are different entities.

如我们所见,本地组别名和关于组的评论也被打印出来。 管理员本地组有两个名为Administratorismail用户。 不要将用户Administrator与本地组Administrators混淆,它们是不同的实体。

LEARN MORE  Linux Bash Comments Inline or Outline
了解更多Linux Bash注释的内联或大纲

将用户添加到组(Add User To A Group)

We can add existing user to the local group by providing the user named and /ADD option. In this example we will add user  ismail to the Developers group. So user ismail will use all resources  and privileges provided by Developers group.

我们可以通过提供用户名称和/ADD选项将现有用户添加到本地组。 在此示例中,我们将用户ismail添加到Developers组。 因此,用户ismail将使用Developers组提供的所有资源和特权。

$ net localgroup Developers ismail /ADD

在组中添加评论 (Add Comment To The Group)

In busy environment we will manage lot of builtin and administrator created groups. We need some clues about these local groups to remember. Or we can set some notes like when we will delete these groups. All these information can be stored in comments about group. We will set some note about Developers group.

在繁忙的环境中,我们将管理许多内置和管理员创建的组。 我们需要一些有关这些本地团体的线索来记住。 或者我们可以设置一些注释,例如何时删除这些组。 所有这些信息都可以存储在有关组的注释中。 我们将为Developers组设置一些注释。

$ net localgroup Developers /COMMENT:"Only 10.1.0.0/24 network"

The comment can be viewer with GUI or while listing group members.

该评论可以是具有GUI的查看者,也可以是列出组成员的评论者。

翻译自: https://www.poftut.com/local-group-management-windows-command-line/

命令行修改本地组策略

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值