Windows Server 2016-Powershell新建用户补充
程序员文章站
2022-04-23 09:10:39
前边我们介绍到Windows Server 2016-图形化新建域用户(一) 及 Windows Server 2016-批量新建域用户(二) ,里边提到了批量通过new-aduser常见帐号,这里简单的对前章节内容做个补充,具体信息如下: 命令语法: 常用字段注解: 例:创建wen帐号: ......
前边我们介绍到windows server 2016-图形化新建域用户(一) 及 windows server 2016-批量新建域用户(二) ,里边提到了批量通过new-aduser常见帐号,这里简单的对前章节内容做个补充,具体信息如下:
命令语法:
new-aduser [-name] <string> [-accountexpirationdate <system.nullable[system.datetime]>] [-accountnotdelegated <system.nullable[bool]>] [-accountpassword <securestring>] [-allowreversiblepasswordencryption <system.nullable[bool]>] [-authtype {<negotiate> | <basic>}] [-cannotchangepassword <system.nullable[bool]>] [-certificates <x509certificate[]>] [-changepasswordatlogon <system.nullable[bool]>] [-city <string>] [-company <string>] [-country <string>] [-credential <pscredential>] [-department <string>] [-description <string>] [-displayname <string>] [-division <string>] [-emailaddress <string>] [-employeeid <string>] [-employeenumber <string>] [-enabled <system.nullable[bool]>] [-fax <string>] [-givenname <string>] [-homedirectory <string>] [-homedrive <string>] [-homepage <string>] [-homephone <string>] [-initials <string>] [-instance <aduser>] [-logonworkstations <string>] [-manager <aduser>] [-mobilephone <string>] [-office <string>] [-officephone <string>] [-organization <string>] [-otherattributes <hashtable>] [-othername <string>] [-passthru <switch>] [-passwordneverexpires <system.nullable[bool]>] [-passwordnotrequired <system.nullable[bool]>] [-path <string>] [-pobox <string>] [-postalcode <string>] [-profilepath <string>] [-samaccountname <string>] [-scriptpath <string>] [-server <string>] [-serviceprincipalnames <string[]>] [-smartcardlogonrequired <system.nullable[bool]>] [-state <string>] [-streetaddress <string>] [-surname <string>] [-title <string>] [-trustedfordelegation <system.nullable[bool]>] [-type <string>] [-userprincipalname <string>] [-confirm] [-whatif] [<commonparameters>]
常用字段注解:
name | 姓名 |
accountexpirationdate | 账户到期时间 |
city | 城市 |
company | 公司 |
department | 部门 |
description | 描述 |
displayname | 显示名称 |
emailaddress | 电子邮件地址 |
employeeid | 员工id |
employeenumber | 员工编号 |
homephone | 家庭电话 |
manager | 经理 |
mobilephone | 移动电话 |
office | 办公室 |
officephone | 办公室电话 |
organization | 组织 |
passwordneverexpires | 密码永不过期 |
samaccountname | 用户登录名(老版本/不带@) |
streetaddress | 街道地址 |
title | 职称 |
userprincipalname | upn用户登录名带@符 |
例:创建wen帐号:
new-aduser -name wen -samaccountname wen -userprincipalname wen@a.com -accountpassword (convertto-securestring "p@ssw0rd" -asplaintext -force) -enabled $true -changepasswordatlogon $false
下一篇: 不同数据库的表迁移SqlServer
推荐阅读
-
Windows Server 2016-Powershell之客户端加域
-
Windows Server 2016-PS筛选导出用户邮箱属性包含某字段列表
-
Windows Server 2016-图形化新建域用户(一)
-
Windows Server 2008 R2多用户远程桌面连接授权
-
windows server 2012/2016 设置多用户远程桌面设置方法
-
Windows server 2008 R2 多用户远程桌面配置详解(超过两个用户)
-
SQL Server如何正确的删除Windows认证用户
-
Windows Server 2016-Powershell新建用户补充
-
SQL Server正确删除Windows认证用户的方法
-
Windows Server 2016-批量新建域用户(二)