当前位置: 移动技术网 > 科技>操作系统>windows > Windows Server 2016-Powershell新建用户补充

Windows Server 2016-Powershell新建用户补充

2019年02月22日  | 移动技术网科技  | 我要评论

黄西脱口秀全集,点金胜手粤语15,张杰qq透明皮肤

前边我们介绍到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

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网