[英]Unlocking Locked Out accounts using PowerShell (not with Quest AD cmdlets)
I'm writing a GUI tool using PowerShell that is able to do most AD related tasks with just a user name and button click. 我正在使用PowerShell编写GUI工具,该工具只需用户名和按钮单击即可完成大多数与AD相关的任务。 I've done all the usual ones (Create / Remove Users, Create / Remove Security & Distribution Groups, Resetting Passwords, etc) but can't find away of unlocking a "Locked Out" account.
我已经完成了所有常见的操作(创建/删除用户,创建/删除安全和通讯组,重置密码等),但是无法解锁“锁定”帐户。
I'm trying to do this without using Quest AD cmdlets as I want a more stand alone solution. 我正在尝试不使用Quest AD cmdlet来执行此操作,因为我想要一个更独立的解决方案。 So I'm wondering whether is possible with plain PowerShell (1.0 or 2.0) in a Windows 2003 Domain.
因此,我想知道在Windows 2003域中使用普通PowerShell(1.0或2.0)是否可行。
Many thanks. 非常感谢。
Set the lockoutTime property of the DirectoryEntry to 0. 将DirectoryEntry的lockoutTime属性设置为0。
Sample: 样品:
$x = [ADSI]'LDAP://SomeDN'
$x.lockoutTime = 0
$x.CommitChanges()
$x.Close()
Been out of the AD world for a few years. 已经离开AD世界几年了。 I haven't worked with PowerShell at all but does the link below offer what you're looking for?
我根本没有使用PowerShell,但是下面的链接是否提供您所需要的?
http://dmitrysotnikov.wordpress.com/2007/08/14/enable-disable-unlock-user-accounts/ http://dmitrysotnikov.wordpress.com/2007/08/14/enable-disable-unlock-user-accounts/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.