在指定时间后禁用任何新AD用户。 [英] Disable any new AD user after specified time.
本文介绍了在指定时间后禁用任何新AD用户。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以创建并运行一个脚本,该脚本不断检查创建的任何新用户,在创建后的10天内未登录,并禁用其帐户?
Is it possible to create and run a script that continously checks for any new user created, that hasn't logged in within 10 days of creation, and disable their account?
谢谢。
推荐答案
Search-ADAccount -AccountInactive -TimeSpan ([timespan]10d) -UsersOnly | Set-ADUser -Enabled
false - WhatIf
这篇关于在指定时间后禁用任何新AD用户。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文