Click here to Skip to main content
15,896,153 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Dear Friends,

we are planning to build a windows application which will auto enable and disable user credential when we was on leave.

suppose from 21-07-2015 To 30-07-2015 i will be on leave.so i can not use my credential(mail id etc) within this period.but when i will be come back my account should auto enable.

we will got all leave request details in a excel file .account enable disable should work as per this excel sheet data.

Regards
Posted

1 solution

Based on the Excel file, why not create a script which would enable/disable the accounts using Powershell and schedule this script using Windows Task Scheduler.

Have a look at Disable-ADAccount[^]

If you need to do it via C# for some reason, have a look at Howto: (Almost) Everything In Active Directory via C#[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900