Win2008/2012r2下批量更改域用户密码
2018-09-08 11:52
2551 查看
使用Windows PowerShell批量更改AD用户的密码,使用以下命令,修改对应字段,执行即可。
1、打开Windows PowerShell加载AD模块:
2、更改所有域用户的密码:
3、更改指定“test”OU中所有域用户的密码:
4、设置域用户下次登陆时不需要更改密码:
1、打开Windows PowerShell加载AD模块:
Import-Module ActiveDirectory
2、更改所有域用户的密码:
Get-ADUser -filter * -SearchBase 'DC=xxx,DC=com' | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "abc123AA" -Force)
3、更改指定“test”OU中所有域用户的密码:
Get-ADUser -filter * -SearchBase 'OU=test,DC=xxx,DC=com' | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "123!@#" -Force)
4、设置域用户下次登陆时不需要更改密码:
Get-ADUser -filter * -SearchBase 'DC=xxx,DC=com' | Set-ADUser -ChangePasswordAtLogon $false
相关文章推荐
- 使用PowerShell命令批量更改域内用户密码
- 批量更改域用户密码
- 批量更改域内所有用户的密码
- Mdaemon升级后用户不能登陆以及批量更改用户密码
- windows 2008 R2 下批量更改域用户密码
- svn更改登录用户和密码
- 在域环境使用脚本批量更改客户机本地管理员密码
- debian进入单用户模式更改密码
- Linux中批量增加用户并设置密码
- Linux用户在第一次登录时强制更改初始密码
- CentOS进入单用户模式更改密码
- 更改MySQL用户密码
- 利用OWA更改域用户密码&利用Web方式更改域用户密码
- 用户信息列表 查询+年龄,性别搜索 +全部删除,批量删除+添加用户+修改密码
- linux下更改root用户的密码 以及VIM编辑器使用命令 :q,:x :w :q!
- linux 创建新用户,更改密码
- 【shell脚本练习】批量添加用户和设置密码
- Exchange-批量取消用户下次登录时必须更改密码
- oracle更改system和sys用户密码的命令
- 用Excel函数及csvde简化批量导入域(AD)用户及修改密码