Hi All,
Im in midst of an urgent scripting requirement. I am not at all good at powershell. So need your help, guys out there.
Actually what I need is - Deleting the home drive of an active directory user after 10 days of deletion of its active directory.
So, the logic that I thought of was - there can be two separate scripts.
The first one will trigger as soon as the Active Directory of the user is deleted by the HELP DESK GUY, this will go and save the home drive path (which is already present in the properties of the active directory), the deletion date (current date + 10 days) and the user name (for identity) of the same user in corresponding 3 columns of an excel sheet (.csv file).
And, the Second script can contain the logic of reading the deletion date column entries and if the current date = deletion date, it will delete its HOME DRIVE by referring to its path saved in the home drive path column of the same user; and if current date is not matching any deletion date then it has to do nothing. This second script will be running two times everyday with the help of task scheduler.
I was even trying to write something down..
it would be greatly appreciable if you can help me in this.
Thanks in advance.