Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Active directory Active Directory重置密码_Active Directory_Powershell 2.0_Windows Server 2012 R2 - Fatal编程技术网

Active directory Active Directory重置密码

Active directory Active Directory重置密码,active-directory,powershell-2.0,windows-server-2012-r2,Active Directory,Powershell 2.0,Windows Server 2012 R2,这是脚本重置用户密码的方式。它按预期工作。问题是如何使新密码重置为仅持续3天。由于没有参数定义重置后要更改的密码的过期时间(或日期),我将创建一个组策略(GPO)以强制执行“重置后过期策略”,然后将该GPO分配给名为的组“到期通行证”用于此目的 最后将使用addadgroup​成员(删除ADGroup)​将用户移动到my“ExpirationPass”组以强制执行策略的脚本中的成员)cmdlet 祝你好运!将创建一个组策略(GPO),以强制执行“重置后过期”策略“这听起来像我要找的,这个GPO在

这是脚本重置用户密码的方式。它按预期工作。问题是如何使新密码重置为仅持续3天。

由于没有参数定义重置后要更改的密码的过期时间(或日期),我将创建一个组策略(GPO)以强制执行“重置后过期策略”,然后将该GPO分配给名为的组“到期通行证”用于此目的

最后将使用addadgroup​成员(删除ADGroup)​将用户移动到my“ExpirationPass”组以强制执行策略的脚本中的成员)cmdlet


祝你好运!

将创建一个组策略(GPO),以强制执行“重置后过期”策略“这听起来像我要找的,这个GPO在哪里?我在“计算机配置”>“安全设置”>“帐户策略”下查看过,没有看到任何类似的内容。这应该通过广告工具来完成,首先是。。。在谷歌上快速搜索一段视频,显示创建GPO和分配给组的整个过程,发现。。。不是很好,但足够清楚,可以理解概念如果答案有用,我会同意你的接受,谢谢。我在“计算机配置>安全设置>帐户策略”下查看了,没有看到任何类似的内容,我一定是瞎了我没有看到任何与“重置策略后过期”相关的内容-我理解应用GPO的概念
Set-ADAccountPassword -Identity DistinguishedName -NewPassword $NewPassword -Reset
Set-aduser DistinguishedName -changepasswordatlogon $true 
Unlock-ADAccount -Identity DistinguishedName