G'day folks. I'm working through an idea to help speed things up at work. We've got a VB script that disables user accounts when they leave the company - that works all well and good, however, after 3 months we need to delete the user, their email content and various folder locations where they have profile/data/etc.
So I've started on the exchange server. I came up with this:
Get-QADUser -SearchRoot 'OU=Users-For-Deletion,OU=GSO Users,DC=gso.internal' | Remove-Mailbox -Identity $user
So technically, from what I've been reading, doing research on the web, that should go to where the disabled users are located and remove the mailbox. If I want to delete the user at the same time from AD, I could just put this switch at the end:-Permanent$true
So, I could put that at the end of the script as the final point. What I really need ideas on, is getting the username, and finding their useraccount folders on the network. That's starting to get outside of my ideas. Maybe something to
display at the end with the list of users taken out of the system?