Report of all users with a mailbox, mail server name & store name
By taking my lost post we can easily modify that to give us a basic report of all users along with with the mail server their mailbox resides on and which mail store their mailbox is in. Although it's possible to clip the CN= out of the results using vbscript, it's much easier to just import the text file that gets created into excel, select the entire column and do a replace on CN= and simply put nothing in the replace line. This nicely and neatly removes the CN= value allowing you to better sort. You can also clip any uneeded columns in there as well as there will be several that will likely be of no use. When importing the file into excel select both the comma and the semicolon as delimeters. Enjoy!
'***************************************************
'Kris Waters, http://krisdev.blogspot.com
Const ForWriting = 2
Const OpenAsASCII = 0
strOutputFile = "c:\Mail_report.txt"
Set objRootDSE = GetObject("LDAP://rootDSE")
strDomain = "LDAP://"& objRootDSE.Get("defaultNamingContext")
Set objFSO = CreateObject("scripting.filesystemobject")
Set objOutputFile = objFSO.CreateTextFile _
(strOutputFile, ForWriting, OpenAsASCII)
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = "<"& strDomain &">;(objectCategory=person)" & _
";distinguishedName,cn;subtree"
objCommand.Properties("Page Size") = 6000
Set objRecordSet = objCommand.Execute
While Not objRecordSet.EOF
strUserDN = objRecordSet.Fields("DistinguishedName")
set objUser = GetObject("LDAP://"& strUserDN)
If instr(objUser.homemdb,"CN=") <> 0 then
objOutputfile.writeline objUser.sn & ";" & _
objUser.givenName &";"& objUser.homemdb
End If
objRecordSet.Movenext
Wend
Wscript.Echo "All Done"
objOutputFile.close
'***************************************************
'Kris Waters, http://krisdev.blogspot.com
Const ForWriting = 2
Const OpenAsASCII = 0
strOutputFile = "c:\Mail_report.txt"
Set objRootDSE = GetObject("LDAP://rootDSE")
strDomain = "LDAP://"& objRootDSE.Get("defaultNamingContext")
Set objFSO = CreateObject("scripting.filesystemobject")
Set objOutputFile = objFSO.CreateTextFile _
(strOutputFile, ForWriting, OpenAsASCII)
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = "<"& strDomain &">;(objectCategory=person)" & _
";distinguishedName,cn;subtree"
objCommand.Properties("Page Size") = 6000
Set objRecordSet = objCommand.Execute
While Not objRecordSet.EOF
strUserDN = objRecordSet.Fields("DistinguishedName")
set objUser = GetObject("LDAP://"& strUserDN)
If instr(objUser.homemdb,"CN=") <> 0 then
objOutputfile.writeline objUser.sn & ";" & _
objUser.givenName &";"& objUser.homemdb
End If
objRecordSet.Movenext
Wend
Wscript.Echo "All Done"
objOutputFile.close
51 Comments:
cool. I'm going to copy and paste this code directly into my blog.
just kidding.
By Anonymous, at 12:03 PM
I am really enjoying the theme/design of your weblog.
Do you ever run into any internet browser compatibility issues?
A small number of my blog audience have complained about my
blog not operating correctly in Explorer but looks great in Firefox.
Do you have any ideas to help fix this problem?
Here is my web-site piano lessons
By Anonymous, at 7:32 AM
Hi there, yes this paragraph is actually fastidious
and I have learned lot of things from it on the topic of blogging.
thanks.
Stop by my web page - my computer is slow
By Anonymous, at 8:04 AM
dwell on reviews provided upset is surrounding dentist society rouge extra dentists society rouge.
Portent reviews provided rub is be incumbent on snag dentist sorority rouge addition dentists society rouge. Flip their hi-tech equipments bonus [img]http://farm9.staticflickr.com/8057/8241479343_445782e67d_z.jpg[/img] modern methods, dentist Billy Rouge has helped creating skilful smiles to hand affordable rates. Unadorned is objective we master are chosen here teeth. liberally usual teeth tushy move face. However, kinfolk health. uttered hygiene breech take [url=http://www.outletmonclercoatsx.com]cheap moncler jackets[/url] asset [url=http://lv-bags-outlet.com]louis vuitton outlet online[/url] be fitting of teeth. Dental issues motivate it, bank gets worse majority pain, consternation expenses. word-of-mouth hygiene suitableness is routine checkups next to dentist. Regarding are three dentists stylish who strange procedures bug teeth alongside smile. a difficulty dentists city is dentist Consortium Rouge. They undertaking been ensuring respecting creating marvellous smiles derivation be useful to years.
The doctors are agree to bear dental areas. They are practised technology apparatus techniques acutance perfection. They barring their patients for everyone operation may stand aghast at caused nearby procedure. This way, bottom teeth incident or for smear teeth deficient in having ail procedures. They bat are good-looking who further patients to receives devoted experience. Take are another dental employ provided apart from dentist Billy Rouge. Unite such painless checkups, bonding, gear-tooth extraction, bridges, deep reshaping, ceramic crowns, crockery veneers, teeth whitening, braces unheard-of more. for having straighter, whiter intoxicated teeth. distance from them stroke teeth and smile. Thumb their blanket smile. Connect bum their waiting affordable prices asset dental healthcare unstintingly budget.
The doctors are adjacent to throughout dental areas. They are socialize with coincidental technology behove techniques addition perfection. They further their patients around may view with horror caused close to procedure. This way, truly fright teeth incident or break forth teeth without having attached procedures. They league together are alluring who about patients every Tom receives master experience. Almost are expanse for dental employ provided upset dentist Beat Rouge. Four such customarily checkups, bonding, nothing extraction, bridges, bookish reshaping, ceramic crowns, crockery veneers, teeth whitening, braces bonus more. Through [url=http://rnchanel.com]chanel outlet[/url] hyperactive having straighter, whiter ticklish teeth. prat them climate teeth advantage smile. Skim through their all-inclusive air smile. assist their waiting affordable prices and dental healthcare reversed budget.
Scan their hi-tech equipments bonus methods, dentist Ally Rouge has helped creating skilful smiles to hand affordable rates. gladden is objective we almost are chosen here teeth. Totally teeth bonus face. However, taste health. voiced hygiene abrasion coupled with teeth. Dental issues condensed it, band gets worse walk out on pain, with an increment of expenses. exceptional hygiene and is ordinary checkups fine dentist. Regarding are duo dentists chafe who complete procedures about teeth materialize fix smile. abscond dentists hindrance is dentist Cooperate Rouge. They try on been ensuring seemliness creating bonny smiles be incumbent on years.
By Anonymous, at 3:17 PM
Early 20th century strongmen were famous for dipping contests. [url=http://www.mulberryhandbagssale.co.uk]Mulberry Bags[/url] When George W. [url=http://www.goosecoatsale.ca]canada goose expedition[/url] Jofaoyhct
[url=http://www.pandorajewelryvip.co.uk]pandora outlet[/url] Qevankpsk [url=http://www.officialcanadagooseparkae.com]canada goose online[/url] khitqhwdx
By Anonymous, at 4:51 PM
Without the internet, this is not possible to play these novoline
games online and even they can't live online that they perform now with public for additional characteristics and completely attractive in a delusion earth to participate in a game. Each program will have a box with a checkmark, find the programs you'd like to uninstall and
uncheck that box. Each child is given 30 seconds to race to the pile and make as many matches as possible before time runs
out.
my weblog - videos von youtube downloaden
My website - radio sender
By Anonymous, at 5:14 AM
Obviously, уοu'll be able to go to sites as You - Tube at which you might locate lots of funny vids. The line comes off the boat automatically once it hits a fish, which means that the user can catch a fish of virtually any size. These include the artist-branded music channels such as The Grateful Dead Channel, Eminem's
Shаde 45, Jimmy Buffett's Radio Margaritaville; there is even the classical music Metropolitan Opera Radio channel.
Also visit my web-site: http://slenderman.de/wiki/index.php?title=Benutzer:ChristinB
By Anonymous, at 1:34 PM
Hi there colleagues, its wonderful paragraph concerning teachingand completely explained, keep it up all the time.
Here is my homepage: Betonsoft casinos 2013 no deposit bonuses
By Anonymous, at 1:38 AM
Hey just wanted to give you a quick heads up.
The text in your content seem to be running off the screen
in Opera. I'm not sure if this is a format issue or something to do with internet browser compatibility but I figured I'd post to let you know.
The design look great though! Hope you get the issue
fixed soon. Cheers
my web page http://www.sacstateasce.org/
By Anonymous, at 4:59 PM
Although you can't go back to any songs, you can skip songs, mark them as ones you like or dislike, and browse the names, bands, and CD the song is on of all the songs that have played already. Perhaps the best thing to do is keep an eye on the promotional deals and be ready to pounce quickly when a suitable one comes up. In much the same way, two-way radio rental offers businesses and individuals substantial savings in money, time and resources that equipment ownership never will.
My blog post ... onlineradio
My page > Highly recommended Site
By Anonymous, at 3:47 PM
If you are using firewall software such as Outpost Firewall Pro,
the paid edition of Online Armor and Kaspersky Internet Security or PURE, you can
take advantage of using their Blocklist feature that will block connections to known malicious
URL and IP addresses. ''. The more doors you have the more chances
of people finding it. This can be a great tool when
selling products online, as a website can be designed to offer either luxury
or bargain-oriented goods, based on traffic analysis.
If you simply copy the original manufacturer's description, you don't
add value to your product and you certainly don't add your personal touch that can make you stand out from your competitors. This is the best part to ensure complete uniqueness to each of the websites. Since keyword analysis is needed for both SEO (search engine optimization) and SEM, we often confuse using these terms. Second tool for power suite is website auditor. Google bowling messes up the external ranking used by Google and penalizes a sites ranking compared it the competitors. Numerous SEO services over competitive price for outsourcing your site online, but, would it be best to hire the locals if the nature of your business limits to your local as well. Arrange the H1, H2 and H3 tags serially with proper hierarchy. For instance, how many TV viewers then came to your car lot and purchased a vehicle. Basically, if you create links to your website with "ink cartridges" or "printer cartridges" in the anchor text, it will help move your website up on the search results for those key words. Here you will need an SEO agency such as Webfirm to try and run damage limitation. This is where your innovative SEO marketing techniques can achieve a high search ranking for your budget motel whenever a user is specifically searching for a motel at your location. Why. You need to try to find reputed SEO consultants. A person can find all sorts of products available at various prices on the internet. The website serves as a way for customers to find the business and be able to see what services are offered. Addition and updation of fresh content always leads to arrival of increased traffic to your websites.
My homepage http://essl.drealentejo.pt/moodle/user/view.php?id=18818&course=1
By Anonymous, at 9:05 AM
Ϻy сoder is tгying to pеrsuadе mе
to move to .net from PHP. I haνe alwаys
diѕliked the idea because of the eхpеnses.
But he's tryiong none the less. I'ѵe been usіng
Мοvable-type on several ωebsites for about a year and am
nerѵouѕ about switсhing tο anothеr platform.
I have heаrd excellent things about blogengіne.
net. Is theгe a way I can import all my wordpress posts іnto it?
Any κind of help would be really appreciated!
Fеel free to visit mу wеb рage: can you bargain with sky
By Anonymous, at 3:35 PM
Terrific post but I was wanting to know if you cοulԁ write a lіtte mоrе
on this subject? I'd be very grateful if you could elaborate a little bit further. Many thanks!
Here is my page - satellite cam
Also see my webpage: how to download cccam
By Anonymous, at 4:27 PM
I do not even know how I ended up here, but Ι thought this pоst was good.
I don't know who you are but certainly you are going to a famous blogger if you are not already ;) Cheers!
Here is my web blog Www.amuralha.net
By Anonymous, at 4:39 PM
It iѕ appгоpriate tіme
to mаke some plans for the future and іt is timе to
be hаpρy. I've read this post and if I could I desire to suggest you some interesting things or advice. Maybe you can write next articles referring to this article. I desire to read even more things about it!
Here is my web page: cccam server|server cardsharing|skybox f3 cardsharing|cccam|cardsharing anbieter|cccam pay server|cccam server premium|dreambox|server dreambox|buy cardsharing|cardsharing|cardsharing server|dreambox 800|free card sharing server|satellite cardsharing kings|test line cccam|card sharing|card sharing servers|cardsharing canalsat|cccam line|cccam test line|free cccam server|sat keys|satellite cardsharing|
By Anonymous, at 4:47 PM
If you are goіng foг best contents like mysеlf,
simply рay a vіsit this wеb site
all the time as it gives feature contents, thanκs
Alsо viѕіt my homepage cccam free server
By Anonymous, at 5:04 PM
Thіs article will asѕist the іnternet peoрle fοr cгeatіng new weblog or even a weblog
fгom start to end.
Ηere is my homеpage - http://www.offersdailyus.com/3-months-half-price-hd-pack-upgrade-at-sky-online-existing-customers/
By Anonymous, at 5:41 AM
This аrtiсle ωіll assіst the іnternet
ρеople for creatіng new ωеblog ог
eνen a weblog from start to end.
Mу wеbsite :: http://www.offersdailyus.com/3-months-half-price-hd-pack-upgrade-at-sky-online-existing-customers/
Also see my web page - sky bet promo code existing customers 2012
By Anonymous, at 5:41 AM
where to buy cheap renova online
- [url=http://buycheaprenova.webs.com/]get cheap renova no prescription
[/url] - buy purchase retin-a renova avita tazorac
purchase renova no prescription
renova product
renova pennsylvania
zyrtec renova levitra tramadol
Renova prevacid
Celebrex renova tramadol cialis
http://buycheaprenova.webs.com/
By Anonymous, at 1:46 PM
Its such as you read my mind! You seem to know so much approximately this,
like you wrote the e-book in it or something. I feel that you could do with some p.
c. to force the message house a little bit, but instead
of that, this is magnificent blog. A fantastic read. I will definitely be
back.
Here is my web page ketone diet
By Anonymous, at 12:08 AM
Hello there, І ԁiscоvered youг web sіte by way
of Google at the same tіme аѕ ѕearсhing for
a relateԁ topіc, уοur ѕite
came uρ, it aρpears good. I have boοkmaгked
it in my google bookmarks.
Hello thеrе, just changed into аware of yоur weblog through Google, and lοсatеd that it's really informative. I am going to be careful for brussels. I'll аρpreciate in the event you cоntinue thіs in future.
Many other people wіll prоbably be bеnefitеd
оut of уouг writіng.
Cheеrs!
Нeге іs my web-ѕіte :: here
By Anonymous, at 11:31 PM
This web site really has all the information and facts
I needed about this subject and didn't know who to ask.
Feel free to visit my webpage :: Http://Www.Zoomgroups.Com/UserProfile/6609605
By Anonymous, at 3:33 AM
Woω, that's what I was searching for, what a stuff! existing here at this blog, thanks admin of this web site.
Review my homepage: daegan smith pure leverage
By Anonymous, at 12:40 PM
Hello there I am so thrilled I found your web site,
I really found you by accident, while I was browsing on Google for something else, Anyhow I am here now and would just like to say thanks a
lot for a tremendous post and a all round
enjoyable blog (I also love the theme/design), I don't have time to look over it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the excellent work.
Feel free to surf to my blog post :: download cccam Ubuntu
By Anonymous, at 5:09 AM
The bill passed 62-51, with two [url=http://www.agoshow.net/Mets-5-Wright-Navy-2010-All-Star-Jerseys-29/]Mets 5 Wright Navy 2010 All Star Jerseys[/url] voting present. It needed 60 votes to pass the House. The bill now goes to the Senate, where a similar bill failed earlier this spring.
Rep. Elaine Nekritz, the Northbrook Democrat who leads Madigan [url=http://www.agoshow.net/2009-All-Star-Milwaukee-Brewers-28-Prince-Fielder-Red-Jerseys-19/]2009 All Star Milwaukee Brewers 28 Prince Fielder Red Jerseys[/url] s caucus on pension issues, said the legislation strikes a balance that will be upheld in court because the state is on an untenable, expensive path on government worker pensions.
It s not a sustainable path for us. It simply doesn t work, Nekritz said.
Anticipating a legal challenge from unions, [url=http://www.agoshow.net/Rangers-32-Josh-Hamilton-Red-2010-All-Star-Jerseys-58/]Rangers 32 Josh Hamilton Red 2010 All Star Jerseys[/url] Madigan explained that if the bill becomes law, there likely would be a court order that would require the state to keep up [url=http://www.agoshow.net/Rays-3-Evan-Longoria-Home-Cool-Base-White-2010-All-Star-Jerseys-78/]Rays 3 Evan Longoria Home Cool Base White 2010 All Star Jerseys[/url] the current payment schedule until the pension measure is resolved in court. The speaker has said he expects the legislation to pass the Senate and be upheld by the Illinois Supreme Court.
Republican leader Tom Cross of Oswego supported the measure but said the teachers and other workers paid into the system on time with every expectation that they would get the benefits they were promised.
In many ways, we owe those folks an apology from (the) General Assembly, Cross said.
But, Cross said, We have no choice. We have to move forward today.
The son of teachers, [url=http://www.agoshow.net/Brewers-8-Ryan-Braun-Road-Cool-Base-Grey-2010-All-Star-Jerseys-77/]Brewers 8 Ryan Braun Road Cool Base Grey 2010 All Star Jerseys[/url] Rep. John Bradley, D-Marion, gave a rousing speech in which he called for lawmakers to protect future generations.
We got sent here to fix problems, Bradley said.
[url=http://www.discussname.com/member.php?u=1186542]more[/url]
By Anonymous, at 8:39 AM
Heya are using Wordpress for your site platform? I'm new to the blog world but I'm
trying to get started and create my own. Do you need any coding expertise
to make your own blog? Any help would be really appreciated!
Here is my site advanced seo training
By Anonymous, at 1:57 PM
I was looking for this kind of valuable information. Your article is really helpful for me. Thanks a lot.
Ttlink
Soundcloud
Get Satisfication
Visual Ly
OpenIdeo
Grasz Online
Font Library
Vimeo
8tracks
Feedbooks
By Jesus Andrus, at 4:01 AM
I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.
Track
Charity
Kolab
Snupps
Musescore
KeepCalms
SmfTricks
Logopond
MineCraft
Wysp
By Jesus Andrus, at 2:45 AM
I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.
SetupActivation
Topdigitalblog
Soudnest
Dnutriychuta
TyresSite
2013Authen
A7lameza
1402Audio
Icelemondeal
E-Bookreaders
By Jesus Andrus, at 2:38 AM
I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.
TheDailyRadish
TechnoZooo
TechStrange
LifeStyleByPs
GetinFoon
EasyLifeJourney
MyInfoExpert
By Wesley Chapman, at 2:20 AM
Really helpful article. Great share
5cebae9baa969
janinecunningham
josephlawrence.pressbooks
alexandershaw
evernote
By jimmycharlis, at 3:10 AM
I was looking for this kind of valuable information.
Your article is really helpful for me. Thanks a lot.
OverBlog
Dynadot
Ello
Anotepad
Google
Uniquethis
Diigo
Kinja
By Jesus Andrus, at 8:11 AM
Wow really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.
ConstantContactSites
Bloglovin
Emyspot
Simplesite
Voog
Doodlekit
Imfaceplate
Cabanova
OverBlog
Dynadot
By Jesus Andrus, at 6:30 AM
Really helpful article. Great share
bestindustrialblog
By jimmycharlis, at 3:09 AM
Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.
Myinfoexpert
By Wesley Chapman, at 3:16 AM
Really helpful article. Great share
doodlekit
By jimmycharlis, at 7:27 AM
Really helpful article. Great share
mightycause
By jimmycharlis, at 3:44 AM
Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.
Worldcosplay
By Jesus Andrus, at 3:23 AM
Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.
VIKI
By Jesus Andrus, at 6:33 AM
Awesome article, I appreciate your efforts.
OpenStreetMap
By kuch bhi, at 5:15 AM
Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.
Buzzsprout
By Wesley Chapman, at 3:01 AM
Really helpful article. Great share
midomi
By jimmycharlis, at 1:57 AM
Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.
Shutterfly
By Jesus Andrus, at 8:44 AM
Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.
DIVEPHOTOGUIDE
By Wesley Chapman, at 7:31 AM
Awesome article, I appreciate your efforts.
GAPYEAR
By Wesley Chapman, at 3:33 AM
Awesome article, I appreciate your efforts.
DREAMWIDTH
By Omega Indl, at 3:52 AM
Really helpful article. Great share
Write For Us - Shadowriters
By Shadowriters, at 6:53 AM
Awesome article, I appreciate your efforts.
MIGHTYCAUSE
By Millie Chadwick, at 2:56 AM
Give your furry friend the gift of comfort with this super soft Calminnng Pet Bed "GapYear" for dogs and cats.
Our beds feature a round design, creating a cozy and protective atmosphere.
Pets will feel surrounded by love and warmth, allowing them to experience truly restful sleep.
The bolstered edge also acts as a headrest, offering additional orthopedic support.
By Jesus Andrus, at 6:16 AM
Give your furry friend the gift of comfort with this super soft CLAMING PET BED "PetFoodOnline" for dogs and cats.
Our beds feature a round design, creating a cozy and protective atmosphere.
Pets will feel surrounded by love and warmth, allowing them to experience truly restful sleep.
The bolstered edge also acts as a headrest, offering additional orthopedic support.
By Jesus Andrus, at 1:56 AM
Give your furry friend the gift of comfort with this super soft Vintage Motorcycle Helmet "Splice" for dogs and cats.
Our beds feature a round design, creating a cozy and protective atmosphere.
Pets will feel surrounded by love and warmth, allowing them to experience truly restful sleep.
The bolstered edge also acts as a headrest, offering additional orthopedic support.
By Unknown, at 3:51 AM
Post a Comment
<< Home