VBScript - Find user mailbox
I'm looking to get the following details from the logged on user with VBScript:
- Exchange server hosting account's associated mailbox
- Mail store of associated mailbox
- Number of messags in mailbox
- Date of newest message in mailbox
- Number of messages over 30 days old
Does anybody have any pointers on how I would go about doing any or all of these?
Thanks for that. Obviously, I have already tried Google though.
I already know that I need to use CDO to access the mailbox, but so far all I can find are existing scripts which scan through a mail store until they find a match for the username.
There's two problems with this technique:
1. There may be multiple people with the same username and I can't risk accessing the wrong one for various reasons.
2. We have 4 Exchange servers with between 3 and 24 mail stores on each, which makes the idea of cycling through the mail store an extremely inefficient method of doing this.
Does anybody know how I can use a principle account name to retrieve the mailbox details?