Another oddball question.
I have a database designed in Access that I use to manage our phone system. Both our phone and voicemail servers run SQL, so I have about a dozen queries I run that collect various chunks of data which is automatically sorted into custom reports.
The problem: my voicemail server runs Exchange, and thus is a domain controller (Exchange must be run on a domain). This voicemail domain is completely independant of our corporate domain. When we delete users from the voicemail server, it only deletes their license - the AD username and the user's mailbox folder remain on the server. This presents wasted space and a possible security issue since the user accounts are not disabled, and can still be used to log in to the server.
I want to run a report that will list all these defunct accounts so I can delete them manually.
So, my next add-on to this database needs to do a few things:
So my question to the community: is there a way to run an SQL query on an AD user group and get a listing of all usernames within that group? If this is possible, I can eliminate the first 2 steps of the process above and shave 5-10 minutes off the entire process (which eventually will be used in about a dozen offices).
Thanks in advance.
I have a database designed in Access that I use to manage our phone system. Both our phone and voicemail servers run SQL, so I have about a dozen queries I run that collect various chunks of data which is automatically sorted into custom reports.
The problem: my voicemail server runs Exchange, and thus is a domain controller (Exchange must be run on a domain). This voicemail domain is completely independant of our corporate domain. When we delete users from the voicemail server, it only deletes their license - the AD username and the user's mailbox folder remain on the server. This presents wasted space and a possible security issue since the user accounts are not disabled, and can still be used to log in to the server.
I want to run a report that will list all these defunct accounts so I can delete them manually.
So, my next add-on to this database needs to do a few things:
- Get a list of all AD user accounts (I can do this by scripted command line)
- Import this list into Access as a new table (possibly using Excel as a mediary?)
- Compare this table of all usernames to a table of active subscribers (which I have)
So my question to the community: is there a way to run an SQL query on an AD user group and get a listing of all usernames within that group? If this is possible, I can eliminate the first 2 steps of the process above and shave 5-10 minutes off the entire process (which eventually will be used in about a dozen offices).
Thanks in advance.