By David Wiseman (Administrator)Created 14 Jun 2006, Modified 13 Aug 2006
My Rating:
Vote
Rating:
Not Rated
Views:7774
Downloads:233

List Exchange Mailbox stores

Language:  VBScript

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 Unknown Windows NT Unknown
Vista Unknown Windows 2008 Unknown
Description

Query active directory for a list of exchange mailbox stores.

Code

Line Numbers: On  Off      Plain Text
Set objRootDSE = CreateObject("LDAP://RootDSE")
configurationNamingContext = objRootDSE.get("configurationNamingContext")
   
Set cn = CreateObject("ADODB.Connection")
Set cmd = CreateObject("ADODB.Command")
Set rs = CreateObject("ADODB.Recordset")

cn.Open "Provider=ADsDSOObject;"
        
query = "<LDAP://" & configurationNamingContext & ">;(objectCategory=msExchPrivateMDB);name,cn,distinguishedName;subtree"

cmd.ActiveConnection = cn
cmd.CommandText = query
Set rs = cmd.Execute

While rs.EOF <> True And rs.BOF <> True
	wscript.echo rs.Fields("distinguishedname").Value
	rs.MoveNext
Wend
   
Set rs = Nothing
Set cmd = Nothing
Set cn = Nothing

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      

Posted On: 10/6/2017 8:29:58 PM

mulberry sale soccer jerseys ugg boots ugg boots coach outlet online michael kors outlet canada goose outlet coach handbags ralph lauren polo shirts ugg outlet ray ban sunglasses oakley sunglasses michael kors outlet swarovski crystal cheap nhl jerseys michael kors outlet cheap uggs coach outlet online coach outlet michael kors outlet giuseppe zanotti outlet michael kors outlet canada goose jackets coach outlet canada goose jackets marc jacobs outlet adidas uk coach outlet online christian louboutin outlet futbol baratas canada goose cazal sunglasses cartier outlet coach outlet prada outlet cheap uggs nike outlet canada goose outle longchamp outlet montblanc pens ugg boots michael kors bags canada goose coats coach outlet nike foamposite michael kors ferragamo shoes michael kors cyber monday oakley sunglasses christian louboutin outlet ugg outlet ugg boots canada goose coats ralph lauren uk canada goose outlet ugg outlet ugg outlet ugg outlet canada goose jackets coach outlet online ugg cyber monday nhl jerseys coach outlet ray ban sunglasses ugg outlet adidas outlet store michael kors outlet fitflops outlet cheap uggs canada goose outlet ugg boots swarovski crystal christian louboutin shoes adidas nmd lebron james shoes cheap jordans soccer jerseys mulberry outlet christian louboutin outlet canada goose outlet michael kors black friday ugg outlet oakley sunglasses longchamp outlet true religion jeans longchamp handbags pandora jewelry ray bans kate spade outlet canada goose coats ralph lauren polo michael kors outlet clearance tods outlet louboutin shoes canada goose outlet true religion outlet nike shoes ferragamo shoes cheap jordans jordan shoes ugg boots uggs outlet ugg outlet coach outlet kevin durant shoes canada goose black friday christian louboutin shoes coach handbags basketball shoes lacoste soldes oakley sunglasses wholesale canada goose outlet kate spade outlet michael kors outlet air max 90 tory burch shoes hermes belt hermes outlet true religion outlet christian louboutin outlet ugg outlet longchamp outlet ralph lauren polo polo outlet lakers jerseys valentino outlet yeezy boost 350 herve leger outlet canada goose jackets ralph lauren polo polo shirts canada goose outle nike trainers canada goose coats ray ban sunglasses michael kors ugg outlet oakley sunglasses true religion jeans oakley sunglasses canada goose jackets nba jerseys canada goose outlet longchamp solde mulberry handbags polo outlet canada goose coats michael kors ralph lauren polo shirts mulberry handbags thomas sabo mulberry handbags longchamp handbags prada shoes coach outlet michael kors outlet canada goose jackets canada goose jackets ugg outlet nike roshe oakley sunglasses reebok outlet store christian louboutin shoes christian louboutin outlet ray ban sunglasses michael kors outlet moncler jackets canada goose outlet oakley sunglasses michael kors handbags canada goose outle nike trainers coach outlet online coach outlet online burberry outlet coach factory outlet coach outlet store online michael kors outlet online ugg outlet michael kors handbags canada goose outlet nike factory outlet swarovski crystal oakley sunglasses cheap ray bans michael kors outlet coach outlet canada coach outlet chrome hearts outlet michael kors outlet online michael kors handbags canada goose outlet tory burch outlet swarovski outlet air max 90 michael kors outlet canada goose uk michael kors factory outlet michael kors outlet clearance fitflops shoes oakley sunglasses wholesale kate spade outlet cheap jordans ugg outlet ugg boots ugg outlet supra shoes michael kors outlet online air max 1 mulberry outlet nba jerseys cheap jerseys michael kors outlet air huarache links of london ugg outlet vans shoes michael kors canada goose jackets canada goose outlet michael kors outlet online christian louboutin online canada goose jackets polo ralph lauren fitflops fitflops true religion jeans michael kors outlet soccer shoes michael kors handbags ferragamo outlet canada goose outlet ray ban sunglasses coach factory outlet oakley sunglasses cleveland cavaliers jersey ugg boots canada goose jackets cheap ugg boots polo ralph lauren ugg boots converse shoes cheap nfl jerseys ugg outlet fitflops sale clearance true religion jeans true religion jeans mlb jerseys wholesale canada goose jackets canada goose outlet ray ban sunglasses nike trainers canada goose parka nike air max 2015 michael kors outlet michael kors outlet online pandora charms sale clearance coach factory outlet coach outlet yeezy boost true religion jeans pandora charms coach outlet ralph lauren outlet michael kors outlet polo ralph lauren fitflops sale clearance mulberry bags ugg outlet pandora jewelry cheap uggs mcm outlet coach outlet online chrome hearts coach outlet ray ban sunglasses michael kors canada goose outlet oakley sunglasses chicago blackhawks jerseys cheap uggs ugg boots swarovski outlet true religion uk oakley sunglasses air max 90 ray ban sunglasses ugg outlet canada goose outlet michael kors outlet reebok trainers lacoste polo shirts canada goose uk tory burch outlet cheap jordans mulberry handbags burberry outlet michael kors outlet online oakley sunglasses prada sunglasses canada goose outlet bottega veneta outlet coach outlet jordan shoes football shirts canada goose jackets coach outlet air jordan 4 canada goose coats canada goose outlet nike store salomon shoes hermes birkin canada goose outlet nike air max 90 michael kors outlet kate spade outlet cheap uggs canada goose outlet michael kors handbags coach outlet online polo ralph lauren michael kors outlet ferragamo outlet canada goose outlet nike air max ralph lauren outlet coach outlet air huarache ugg outlet polo outlet mulberry bags kobe bryant shoes michael kors handbags oakley sunglasses swarovski crystal ray ban sunglasses longchamp pas cher canada goose jackets mont blanc pens tory burch outlet coach outlet ralph lauren uk michael kors outlet burberry outlet nike shoes air max uk fitflops shoes polo outlet louboutin shoes fitflops sale clearance nfl jersey wholesale michael kors outlet adidas wings coach factory outlet tory burch outlet canada goose outle cheap snapbacks pandora charms coach outlet online nfl jerseys wholesale canada goose uk ed hardy clothing burberry outlet coach factory outlet nike air force 1 canada goose outlet michael kors outlet christian louboutin uk oakley sunglasses tory burch outlet michael kors outlet kobe 9 tory burch outlet oakley sunglasses ugg outlet ugg boots michael kors handbags coach outlet online canada goose outle birkenstock sandals cheap snapbacks ray ban sunglasses nike store uk michael kors handbags longchamp pliage oakley sunglasses coach outlet online birkenstock outlet oakley sunglasses ugg black friday kate spade outlet michael kors outlet uggs on sale prada handbags canada goose outlet canada goose outle canada goose jackets canada goose uk cheap nfl jerseys ralph lauren polo ugg outlet polo ralph lauren true religion jeans longchamp handbags ray ban sunglasses canada goose jackets ray ban sunglasses coach factory outlet true religion jeans michael kors outlet ugg boots ray bans ecco shoes air max 90 true religion outlet longchamp handbags pandora jewelry polo ralph lauren ugg boots coach outlet online coach factory outlet polo outlet canada goose jackets canada goose jackets coach outlet online nike free 5 coach outlet online coach outlet fitflops sale nike outlet store coach outlet air max trainers michael kors outlet michael kors outlet online oakley sunglasses jordan shoes canada goose outle ugg boots ugg boots polo ralph lauren puma outlet ferragamo shoes canada goose outlet polo ralph lauren ray ban sunglasses canada goose outlet ferragamo outlet ugg boots ray ban sunglasses true religion jeans mac cosmetics michael kors outlet online true religion jeans canada goose coats canada goose cyber monday coach handbags ysl outlet hermes outlet lebron james shoes coach factory outlet michael kors factory outlet nike blazer pas cher canada goose outlet coach outlet asics shoes true religion outlet ugg outlet uggs outlet cheap mlb jerseys coach outlet online mbt shoes polo ralph lauren fred perry polo shirts cheap nfl jerseys canada goose jackets canada goose uk coach factory outlet ray-ban sunglasses michael kors outlet clearance michael kors wallets canada goose jackets ferragamo shoes canada goose outlet uggs outlet ugg outlet longchamp bags michael kors outlet new balance shoes coach factory outlet ugg outlet coach outlet coach outlet kate spade outlet ugg boots canada goose jackets tory burch outlet ugg outlet ray ban sunglasses oakley sunglasses adidas trainers true religion jeans adidas nmd ugg outlet longchamp solde kobe shoes nike roshe one canada goose outlet ralph lauren pas cher michael kors outlet 20171007caihuali