• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Enable a specific AD account for 8 hours

Hi ;

I have this one account which we allocated for external users. This account will be enable on demand basis. But I wanted it to be expire after 8 hours it is enable. Is there any function is the AD that can do that ?
0
chongbenkee
Asked:
chongbenkee
1 Solution
 
ghodderCommented:
Open the user account in ADUC, open the "Account" tab, click "Logon hours" and only enable the block of 8 hours that you wish the account to be active for on whichever day of the week is required. Also set "Expire at end of" to the current date so that the account is disabled at the end of that day.
0
 
Kiran ChCommented:
easiest way is by powershell
use this example : Set-ADUser -AccountExpirationDate "05/01/2012 5:00:00 PM"
but you need to download Active Directory module for Windows PowerShell...
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now