locked
User account to be enabled from set date RRS feed

  • Question

  • I am looking at an automated new user creation process primarily using Powershell. With some of the new accounts the start date of the new employee could be up to 6 weeks in the future. I am looking for the equivalent to the Account Expires date feature - Account enabled from date. I do not like the idea of an authorised account available with a known password for weeks before the account will be used. I could also see this being useful for planned extended absences. Is this possible?

    Geoff

    Tuesday, August 14, 2012 9:49 AM

Answers

  • The only option I see is scheduling the powershell to run(either create the account,  if created enable the account) via scheduled task at the specificed date.

    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com


    Tuesday, August 14, 2012 3:13 PM
  • You could use a PS script running as a scheduled  task, and for accounts that need to be created with deferred activation, find some unused field in AD and populate it with the date the account should be activated. 

    Schedule the script to run daily, find all the accounts with that field populated, and if it finds one that's due to be actived, enable it and clear the field.


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Tuesday, August 14, 2012 3:23 PM
  • Yes, you can just follow majolinor's suggestion, schedule one script to set on your server.

    Here is one document about using scheduled tasks to run PowerShell script, hope can give you some help:

    Use Scheduled Tasks to Run PowerShell Commands on Windows

    http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/use-scheduled-tasks-to-run-powershell-commands-on-windows.aspx

    Thanks,

    Evan Liu

    TechNet Subscriber Supportin forum

    If you have any feedback on our support, please contact tngfb@microsoft.com 


    Evan Liu

    TechNet Community Support

    Wednesday, August 15, 2012 7:24 AM
    Moderator

All replies

  • The only option I see is scheduling the powershell to run(either create the account,  if created enable the account) via scheduled task at the specificed date.

    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com


    Tuesday, August 14, 2012 3:13 PM
  • You could use a PS script running as a scheduled  task, and for accounts that need to be created with deferred activation, find some unused field in AD and populate it with the date the account should be activated. 

    Schedule the script to run daily, find all the accounts with that field populated, and if it finds one that's due to be actived, enable it and clear the field.


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

    Tuesday, August 14, 2012 3:23 PM
  • Yes, you can just follow majolinor's suggestion, schedule one script to set on your server.

    Here is one document about using scheduled tasks to run PowerShell script, hope can give you some help:

    Use Scheduled Tasks to Run PowerShell Commands on Windows

    http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/use-scheduled-tasks-to-run-powershell-commands-on-windows.aspx

    Thanks,

    Evan Liu

    TechNet Subscriber Supportin forum

    If you have any feedback on our support, please contact tngfb@microsoft.com 


    Evan Liu

    TechNet Community Support

    Wednesday, August 15, 2012 7:24 AM
    Moderator
  • How about the issue, any updates?

    Thanks,

    Evan Liu

    TechNet Subscriber Supportin forum

    If you have any feedback on our support, please contacttngfb@microsoft.com


    Evan Liu

    TechNet Community Support

    Thursday, August 16, 2012 3:20 AM
    Moderator