如何通过命令行configurationWindows Server 2008 R2中的用户权限?

我必须在我们的Windows S 2008 R2中创build大约800个用户,并且希望对他们进行一些设置。

  1. 创build用户: net user Joe 1mb4pASs /add /fullname:"John Smith" /passwordchg:no /comment:"no comment"

  2. 设置永不过期的密码: wmic useraccount where "Name='Joe'" set PasswordExpires=FALSE

  3. 将用户添加到两个组(如GUI中的Members Of选项卡)

    • 远程桌面用户
    • (我从匈牙利翻译,因为服务器) Terminal Services - Computers通过webaccess启用应用程序

第3步是我有问题的地方。 我应该使用什么命令?

你可以用net.exe来完成这个工作:

net localgroup "Remote Desktop Users" /add domain\Joe

不过,您可能不想将用户添加到“ Terminal Services Computers组。 当您有GPO根据启用的组执行许可时,用于远程桌面服务许可。

您需要知道DN(AD组和用户的专有名称)

通过命令行界面将成员添加到AD中的组中

通过CLI将成员添加到本地组