如何在用户登录时强制Windows密码过期? [英] How to force Windows password to expire when user is log in ?

查看:382
本文介绍了如何在用户登录时强制Windows密码过期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我不是最好的脚本编写者,所以这就是我真正需要你帮助的原因..

Hi. I'm not the best one on scripting, so that's why I really need your help..

我需要构建一个脚本(VB或Batch)来强制用户使用Windows密码实时过期。当Windows密码在阻止我们家庭应用程序的所有共享访问的用户会话中间过期时,我们遇到一些问题。我们有
来使用这个脚本来测试测试帐户并强制它们像我们的用户一样过期。

I need to built a script (VB or Batch) that will force a user Windows password to be expired in real time. We have some issues when Windows password is expired in the middle of the user sessions that block all shared access for our home application. We have to use this script for testing test account and force them to be expired like our users issues.

我知道我可以在AD中更改属性"的pwdLastSet"为"0"或"-1"。

I know that I can change in AD the attribute "pwdLastSet" to "0" or "-1".

我更喜欢每次我需要测试时都可以运行的东西..

I would prefer something that I can run everytime I need for my test..

希望有人可以提供帮助我.. :)

Hope someone can help me.. :)

谢谢

推荐答案

即使你过期了用户密码,通过为pwdLastSet指定0,他们不需要在下次登录之前更改它。您需要强制注销。
Even if you expire the user password, by assigning 0 to pwdLastSet, they won't need to change it until they next logon. You would need to force a logoff.


这篇关于如何在用户登录时强制Windows密码过期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆