Guest RJF Posted February 22, 2008 Posted February 22, 2008 I am on a Windows 2003 Domain. Is there a tool out there that will let you set the exact time and date to disable a user account.
Guest Pegasus \(MVP\) Posted February 22, 2008 Posted February 22, 2008 Re: Disable a User Account "RJF" <RJF@discussions.microsoft.com> wrote in message news:572E0302-5E37-4EFB-9DCD-CD21CC60B9F5@microsoft.com... >I am on a Windows 2003 Domain. Is there a tool out there that will let you > set the exact time and date to disable a user account. Create a scheduled task to run this command: net user rjf /active:no
Guest Marcin Posted February 22, 2008 Posted February 22, 2008 Re: Disable a User Account Assuming that you have Account Management auditing turned on, you might be able to determine this by checking the content of the Security Event Log on the domain controller where the account has been disabled. If that was the most recent change applied to the account, check the value of modifyTimeStamp attribute of its AD object (via ADSIEdit.msc or LDP)... hth Marcin
Guest Richard Mueller [MVP] Posted February 23, 2008 Posted February 23, 2008 Re: Disable a User Account "Pegasus (MVP)" <I.can@fly.com.oz> wrote in message news:e5%23GDvWdIHA.5448@TK2MSFTNGP03.phx.gbl... > > "RJF" <RJF@discussions.microsoft.com> wrote in message > news:572E0302-5E37-4EFB-9DCD-CD21CC60B9F5@microsoft.com... >>I am on a Windows 2003 Domain. Is there a tool out there that will let >>you >> set the exact time and date to disable a user account. > > Create a scheduled task to run this command: > > net user rjf /active:no > You can also assign a date/time to the accountExpires attribute. When the account expires, it cannot be used. In VBScript you can use the AccountExpirationDate property method: ========= ' specify date time (in local time) for account to expire. dtmExpire = #03/02/2008 15:30# ' Bind to user object using Distinguished Name. Set objUser = GetObject("LDAP://cn=Jim Smith,ou=Sales,ou=West,dc=MyDomain,dc=com") ' Assign expiration date. objUser.AccountExpirationDate = dtmExpire objUser.SetInfo ======== Note that the "Account" tab in ADUC will show account expires at end of a date. In my example the tab will show at end of day March 1, but the account will actually expire at the specified time. At end of day really means any time during the next day. -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net --
Recommended Posts