Windows ドメインのアカウントのロック解除 (2)
Windows2003 Activedirectory 環境において、ドメインユーザーのアカウントロックを
解除するスクリプトです。
しかし、勉強中のためou及びdcの指定の仕方がいまいち分かりません、、、
Unlock_ADUser2003.vbs
----
Dim UserName, Title
Title = "Unlock_ADUser2003"
UserName = InputBox("Enter the user's login name that you want to unlock:", Title, "")
Set objUser = GetObject _
("LDAP://cn="& UserName &",ou=manager,dc=hogehoge,dc=com")
objUser.IsAccountLocked = False
objUser.SetInfo
If err.number = 0 Then
Wscript.Echo "The Account Unlock Failed. Check that the account is, in fact, locked-out."
Else
Wscript.Echo "The Account Unlock was Successful"
End if
----
--参考ページ
http://www.microsoft.com/japan/technet/scriptcenter/scripts/ad/users/status/usstvb07.mspx
「Script」カテゴリの記事
- .exe 検索バッチ(2012.04.18)
- Windows7 展開(5)(2011.05.12)
- Dropboxを活用 自動印刷(2010.10.15)
- VHD(仮想ディスク) コマンド作成(2010.02.16)
- 対話式 Account control batch(2009.09.18)



Comments