By David Wiseman (Administrator)Created 14 Jan 2006, Modified 23 Feb 2008
My Rating:
Vote
Rating:
(1 votes)
Views:8690
Downloads:462

List users with mailbox

Language:  VBScript

Compatibility

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

Creates a CSV file of all the users in the domain that have an Exchange mailbox

Code

Line Numbers: On  Off      Plain Text
const FileName = "userswithmailboxes.csv"

set cn = createobject("ADODB.Connection")
set cmd = createobject("ADODB.Command")
set rs = createobject("ADODB.Recordset")

cn.open "Provider=ADsDSOObject;"
cmd.activeconnection = cn

set objRoot = getobject("LDAP://RootDSE")

cmd.commandtext = "<LDAP://" & objRoot.get("defaultNamingContext") & _
		">;(&(objectClass=User)(HomeMDB=*));samaccountname,sn,givenname;subtree"
'**** Bypass the 1000 record limitation ****
cmd.properties("page size") = 1

set rs=cmd.execute

set objFSO = createobject("Scripting.FileSystemObject")
set objCSV = objFSO.createtextfile(FileName)
q = """"


while rs.eof <> true and rs.bof <> true
	objcsv.writeline(q & rs("samaccountname") &  q & "," & q  & _
			rs("sn") & q & "," & q & rs("givenName") & q)
	rs.movenext
wend

objCSV.Close
cn.close
	
wscript.echo "Finished"

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
lcklck16
Posted On: 8/18/2017 4:00:58 AM

20170819 junda michael kors canada michael kors outlet online ugg boots clearance michael kors outlet swarovski crystal canada goose outlet ray ban sunglasses longchamp outlet online coach outlet online christian louboutin outlet cheap ray bans michael kors outlet online ray ban sunglasses outlet coach outlet online nike air huarache kobe 9 elite coach outlet coach outlet online michael kors outlet store roshe run polo ralph lauren tory burch outlet stores michael kors outlet ralph lauren polo michael kors outlet online cheap oakley sunglasses fred perry polo coach outlet online tods outlet online christian louboutin sale ralph lauren outlet ugg boots clearance cheap oakley sunglasses jerseys wholesale ugg boots outlet prada outlet online nfl jersey cheap ray ban sunglasses polo pas cher uggs outlet polo outlet online coach outlet online coach outlet online michael kors outlet online polo ralph lauren nba jerseys nike shoes cheap jordans oakley sunglasses wholesale snapbacks wholesale air max 90 michael kors handbags clearance max 1 coach outlet snapbacks wholesale mulberry handbags mulberry bags oakley sunglasses sale burberry outlet sale michael kors outlet online polo outlet ugg outlet,ugg outlet store,uggs outlet,ugg outlet online clearance,ugg outlet coupons,ugg outlet boots,ugg outlet online store,ugg outlet sale nhl jerseys canada goose outlet store nike trainers uk mbt shoes christian louboutin outlet Basketball Shoes cheap ray ban sunglasses fitflops uk coach outlet online coach factory outlet asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano canada goose jackets on sale tory burch outlet online ferragamo shoes sale ferragamo outlet links of london jewellery oakley sunglasses sale pandora outlet cheap ray ban sunglasses ed hardy outlet oakley sunglasses wholesale coach outlet true religion outlet uk canada goose outlet michael kors handbags coach factory outlet longchamp handbags polo ralph lauren canada goose jackets men michael kors uk cazal outlet adidas nmd runner christian louboutin ugg boots clearance,ugg boots,ugg boots outlet,ugg boots for women,ugg boots on sale,ugg boots for men,ugg boots for kids,ugg boots clearance sale women,ugg boots clearance outlet uggs outlet mulberry handbags coach factory outlet ugg outlet store oakley sunglasses wholesale oakley sunglasses wholesale ralph lauren?uk true religion outlet true religion outlet mont blanc pens michael kors outlet clearance ray ban sunglasses nike shoes ugg clearance michael kors handbags uggs outlet cheap jordans free shipping fitflops uk coach outlet store online canada goose outlet ferragamo shoes coach outlet coach outlet air max trainers michael kors outlet stores cheap oakley sunglasses canada goose outlet online canada goose outlet store michael kors outlet online true religion outlet store coach outlet ugg outlet online michael kors outlet clearance adidas shoes uggs outlet michael kors outlet online kobe shoes longchamp handbags air max 90 chrome hearts outlet ugg outlet stores cheap nfl jerseys coach outlet online michael kors outlet clearance michael kors handbags outlet michael kors uk birkenstock shoes ralph lauren uk christian louboutin shoes cheap oakley sunglasses cheap ray ban sunglasses adidas nmd air force 1 shoes swarovski jewellery tory burch outlet online coach outlet cheap jordan shoes longchamp handbags oakley sunglasses wholesale cheap oakley sunglasses polo outlet stores adidas shoes michael kors outlet christian louboutin christian louboutin uk ugg clearance ralph lauren uk coach outlet online canada goose outlet oakley sunglasses coach outlet store online pandora jewelry chrome hearts online store swarovski outlet burberry outlet store ralph?lauren mbt shoes outlet true religion canada true religion jeans sale vans outlet coach outlet store online adidas shoes canada goose jackets for women kate spade handbags coach outlet online coach factory outlet christian louboutin sale foamposite shoes hermes belts cheap ray bans coach outlet online uggs outlet ugg boots australia polo outlet ugg boots outlet nfl jersey wholesale michael kors outlet online oakley sunglasses wholesale cheap michael kors handbags mlb jerseys prada outlet cheap jordans fitflops nike free running mlb jerseys michael kors outlet clearance pandora jewellery nike outlet store online air max 90 herve leger dresses salomon outlet michael kors outlet clearance oakley sunglasses cheap soccer jerseys ugg outlet ralph lauren polo nike shoes outlet nike air huarache adidas uk store christian louboutin shoes longchamp outlet cheap uggs outlet,cheap uggs for sale,cheap ugg boots,cheap uggs for kids,cheap uggs for women,cheap uggs bailey bow,cheap uggs china,cheap uggs for men,cheap uggs for girls,cheap uggs boots for women ugg boots,ugg boots outlet,cheap uggs boots,ugg boots for women,ugg boots on sale,ugg boots clearance,ugg boots clearance sale women,ugg boots clearance outlet,ugg boots for men,ugg boots for kids ugg outlet store coach outlet store online uggs outlet lebron shoes ugg outlet canada goose jackets pandora outlet thomas sabo charms mont blanc outlet adidas outlet ralph lauren uk pandora outlet polo outlet store michael kors outlet clearance coach outlet online coach outlet online max 90 coach outlet clearance nike air max 1 michael kors outlet ralph lauren outlet oakley sunglasses wholesale puma shoes cheap uggs mac tools cheap jerseys wholesale kate spade uk canada goose jackets outlet mulberry outlet,mulberry handbags outlet ralph lauren true religion jeans air max 90 michael kors outlet clearance ray ban sunglasses uk ysl outlet online polo outlet stores ralph lauren outlet cheap football shirts nike outlet store online ugg boots clearance michael kors outlet clearance michael kors outlet clearance longchamp handbags christian louboutin shoes cheap ray ban sunglasses ray ban sunglasses uk coach outlet store online ralph lauren michael kors outlet clearance ray-ban sunglasses longchamp outlet ralph lauren coach outlet nike store uk ugg outlet,ugg outlet sale,uggs outlet,ugg outlet online clearance,ugg outlet store,ugg outlet coupons,ugg outlet boots,ugg outlet online store canada goose coats coach outlet coach outlet online coach outlet michael kors outlet online christian louboutin shoes tory burch sandals michael kors outlet online coach factory outlet kd shoes ugg outlet clearance,ugg outlet online clearance,ugg outlet,uggs outlet,ugg outlet store,ugg outlet coupons,ugg outlet boots,ugg outlet online store,ugg outlet sale oakley sunglasses wholesale michael kors outlet nhl jerseys wholesale coach factory outlet michael kors outlet ray ban sunglasses hermes outlet store mulberry bags new balance outlet coach outlet clearance fitflops sale clearance jordan shoes coach factory outlet jordan 4 true religion jeans outlet canada goose uk ray ban sunglasses wholesale coach outlet cheap ray ban sunglasses michael kors outlet online michael kors outlet clearance soccer jerseys wholesale reebok shoes uggs outlet ferragamo shoes nike air max 90 michael kors handbags outlet air max shoes coach outlet coach outlet store online prada outlet cheap jordans for sale michael kors bags ugg boots clearance polo outlet coach outlet online michael kors handbags nike roshe run polo ralph lauren ferragamo outlet polo ralph lauren cheap oakley sunglasses mulberry handbags ugg boots outlet michael kors outlet store cheap oakley sunglasses coach outlet store online reebok shoes bottega veneta outlet online ugg outlet clearance polo ralph lauren outlet coach outlet michael kors outlet clearance cheap oakley sunglasses michael kors outlet online christian louboutin shoes coach factory outlet coach outlet hermes outlet ugg outlet online ralph lauren outlet ralph?lauren?polo?shirts canada goose jackets mac outlet ralph lauren shirts burberry canada mcm backpacks prada sunglasses for women ugg boots for women,ugg boots,ugg boots outlet,ugg boots on sale,ugg boots clearance,ugg boots for men,ugg boots for kids,ugg boots clearance sale women,ugg boots clearance outlet ray ban wayfarer Nike Free shoes michael kors handbags true religion outlet yeezy boost 350 oakley sunglasses wholesale nfl jerseys nfl jersey wholesale nike shoes uk ugg boots clearance canada goose jackets ralph lauren outlet stores cheap nfl jerseys yeezy boost nike uk store coach outlet clearance nfl jerseys oakley sunglasses wholesale ralph lauren outlet true religion jeans marc jacobs sale fitflops sale clearance longchamp bags michael kors outlet coach outlet oakley sunglasses sale lacoste outlet true religion outlet polo ralph lauren outlet fitflops michael kors outlet clearance michael kors handbags tory burch handbags nike air max 90 hermes birkin bag coach outlet online michael kors outlet online true religion uk adidas shoes adidas outlet tory burch outlet cheap jordan shoes ugg boots,ugg boots outlet,ugg boots for women,ugg boots on sale,ugg boots clearance,ugg boots for men,ugg boots for kids,ugg boots clearance sale women,ugg boots clearance outlet cheap oakley sunglasses kate spade canada goose outlet lebron shoes mulberry outlet pandora jewelery true religion jeans pandora charms burberry outlet store oakley sunglasses cheap ray ban sunglasses mulberry uk cheap oakley sunglasses cheap oakley sunglasses kate spade outlet online nike trainers cheap oakley sunglasses kate spade handbags michael kors outlet polo outlet polo ralph lauren outlet birkenstock shoes nike shoes for women ralph lauren polo coach factory outlet canada goose coach outlet soccer cleats coach outlet store online oakley sunglasses true religion jeans sale cheap oakley sunglasses michael kors outlet online coach outlet clearance supra shoes sale nba jerseys wholesale swarovski uk mulberry outlet coach handbags outlet swarovski jewelry valentino shoes mulberry handbags sale michael kors outlet online christian louboutin outlet canada goose jackets ugg outlet michael kors outlet clearance christian louboutin shoes pandora bracelet los angeles lakers swarovski crystal tory burch outlet online ray-ban sunglasses oakley sunglasses wholesale lacoste polo michael kors uk polo ralph lauren outlet adidas wings shoes coach factory outlet coach outlet online ugg outlet,uggs outlet,ugg outlet online clearance,ugg outlet store,ugg outlet coupons,ugg outlet boots,ugg outlet online store,ugg outlet sale polo ralph lauren outlet coach outlet online cheap jerseys wholesale coach outlet online coach factory outlet coach outlet online cheap nba jerseys nike outle giuseppe zanotti shoes michael kors outlet nike outlet online ralph lauren outlet christian louboutin sale nike roshe run coach factory outlet ugg boots clearance tory burch outlet online nike blazer pas cher ralph lauren outlet kate spade uk canada goose jackets snapback hats canada goose outlet swarovski jewelry ecco outlet polo ralph lauren oakley sunglasses sale true religion jeans cheap jordan shoes michael kors outlet clearance coach outlet online fitflops sale clearance uggs outlet cheap oakley sunglasses cheap ray ban sunglasses lacoste pas cher basketball shoes,basketball sneakers,lebron james shoes,sports shoes,kobe bryant shoes,kobe sneakers,nike basketball shoes,running shoes,mens sport shoes,nike shoes canada goose outlet cheap ray ban sunglasses coach outlet store online ugg boots outlet michael kors outlet online cheap oakley sunglasses polo ralph lauren ferragamo outlet polo ralph lauren michael kors wallets for women nike outlet ray ban sunglasses canada goose jackets lacoste shirts cheap oakley sunglasses cheap mlb jerseys coach outlet coach outlet store online oakley sunglasses wholesale cheap jordan shoes michael kors outlet online ugg outlet,ugg outlet clearance,uggs outlet,ugg outlet online clearance,ugg outlet store,ugg outlet online store,ugg outlet sale,ugg outlet coupons,ugg outlet boots nike air max true religion outlet polo ralph lauren oakley sunglasses wholesale camisetas futbol baratas mbt shoes outlet michael kors outlet clearance ferragamo shoes ray bans michael kors outlet clearance coach factory outlet coach outlet store michael kors outlet clearance ralph lauren outlet coach outlet air max 2015 fitflops sale clearance ugg outlet store pandora charms sale clearance ralph lauren michael kors uk nike trainers fitflops cleveland cavaliers jerseys coach outlet cheap oakley sunglasses michael kors outlet clearance cheap nike shoes cheap ray ban sunglasses kobe bryants shoes converse shoes sale coach factory outlet cheap oakley sunglasses coach outlet online michael kors factory outlet christian louboutin sale ray ban sunglasses outlet pandora outlet ralph lauren outlet

lcklck16
Posted On: 9/7/2017 7:02:14 PM

chenyingying20170908 the north face outlet rolex oyster perpetual coach factory outlet ugg outlet online tory burch outlet canada goose canada cheap oakley sunglasses louis vuitton handbags louis vuitton uk ugg boots polo ralph lauren outlet salvatore ferragamo belt coach purses hermes belt outlet michael kors bags adidas stan smith shoes moncler jacket outlet yeezy 350 v2 michael kors handbags michael kors outlet giuseppe zanotti sneakers north face outlet supreme outlet uggs uk ferragamo shoes north face outlet uggs outlet online moncler outlet ray ban online ray ban sunglasses burberry handbags mk väska canada goose for sale ugg boots christian louboutin outlet mbt outlet ralph lauren outlet ugg sale red bottom heels ugg boots christian louboutin pas cher coach outlet rolex daytona uggs classic boots ugg boots polo ralph lauren pas cher prada outlet versace glasses birkenstock sandals coach outlet online adidas stan smith ugg boots oakley sunglasses cheap coach factory outlet fitflops shoes coach outlet michael kors outlet online ugg outlet cheap snapbacks ugg australia louis vuitton handbags manolo blahnik outlet christian louboutin outlet canada goose outlet ugg australia boots coach outlet burberry sale ralph lauren uk mlb jerseys true religion sale polo ralph lauren nike store ugg outlet ugg outlet online michael kors outlet polo ralph lauren ugg outlet adidas trainers ugg outlet michael kors outlet cheap jordans nike huarache thibaut courtois jersey ugg slippers ralph lauren outlet coach outlet ugg boots clearance ray ban sunglasses outlet nike outlet store ugg outlet store north face outlet uggs australia ralph lauren polo kate spade outlet online nike factory store michael kors handbags superdry uk louis vuitton outlet carrera sunglasses mulberry sale cheap jordan shoes cartier glasses nike huarache shoes uggs outlet ray ban sunglasses adidas yeezy ralph lauren uk michael kors outlet true religion jeans cheap jordan shoes coach factory outlet kate spade outlet store mk väska fitflops shoes mk taschen ugg boots ugg boots outlet cheap ugg boots air jordan retro louis vuitton christian louboutin shoes christian louboutin outlet michael kors outlet coach outlet online north face clearance polo outlet north face jackets uggs outlet ugg boots on sale 65% off michael kors handbags polo ralph lauren coach factory outlet burberry outlet store north face outlet polo ralph lauren outlet coach factory outlet nike factory store yeezy boost 350 hermes birkin bag louis vuitton outlet ugg australia supreme shirts michael kors handtaschen christian louboutin sale louis vuitton outlet prada outlet online new balance shoes discount nike ugg australia pandora jewelry outlet coach outlet 70% off ugg boots cheap jordans hermes birkin bag canada goose outlet uggs outlet ray ban sunglasses christian louboutin uk chaussure yeezy coach factory outlet pandora charms moncler outlet ray ban aviators uggs canada air jordan shoes canada goose outlet ugg sale michael kors outlet cheap michael kors handbags ugg boots adidas yeezy boost 350 nfl jerseys from china ugg boots ugg boots longchamp bags longchamp handbags adidas outlet moncler jacket fitflops sale kate spade outlet michael kors outlet mcm handbags burberry sale true religion outlet michael kors handtaschen ugg boots ray ban sunglasses mlb jerseys prada glasses louis vuitton outlet uggs outlet ralph lauren outlet the north face outlet nike roshe run pandora jewelry ugg boots uggs clearance cheap nfl jerseys montblanc pens occhiali da sole ray ban hermes handbags burberry sale coach factory outlet online paul pogba jersey uggs outlet pandora bracelet michael kors outlet online ralph lauren michael kors outlet coach outlet online fitflop outlet air max uk salvatore ferragamo outlet adidas nmd runner north face outlet michael kors outlet clearance cheap mlb jerseys mulberry uk coach outlet adidas trainers uk vans outlet ugg boots uk oakley sunglasses wholesale ralph lauren outlet online fitflops sandals polo ralph lauren louis vuitton outlet louis vuitton outlet burberry canada nike trainers uk ugg sale tory burch outlet pandora charms coach outlet online polo ralph lauren sale retro jordans prada outlet birkenstock sandals ugg boots outlet nike air max 95 moncler jacket ugg outlet north face jackets yeezy boost 350 gafas de sol ray ban 2017 ray ban sunglasses coach factory outlet online michael kors outlet clearance oakley vault michael kors handbags nike running fitflops sale clearance cheap ugg boots polo ralph lauren outlet michael kors outlet coach factory outlet mont blanc ballpoint pens ray ban sunglasses outlet oakley sunglasses outlet ugg sale coach factory outlet tommy hilfiger canada cheap nhl jerseys true religion jeans nike blazer nike nfl jerseys north face jackets rolex online store montre rolex homme longchamp outlet store cheap ugg boots nike air max oakley sunglasses outlet armani sunglasses michael kors canada coach outlet canada goose sale polo ralph lauren outlet burberry outlet online ralph lauren t shirt superdry clothing christian louboutin shoes louboutin outlet ralph lauren outlet ugg boots on sale michael kors handtaschen oakley sunglasses ugg factory outlet ugg boots true religion outlet air jordans cheap oakley sunglasses adidas originals kate spade sale rolex datejust 2 fitflops clearance coach outlet cheap uggs outlet michael kors outlet clearance coach factory outlet true religion jeans polo ralph lauren outlet hermes birkin handbags ugg boots on sale supreme clothing louis vuitton handbags nike shoes cheap jordan shoes polo ralph lauren uk jordan shoes cheap nba jerseys true religion jeans christian louboutin outlet fitflops shoes michael kors outlet ray ban sunglasses kate spade sale coach outlet online nfl jerseys wholesale nike outlet 30% off michael kors handbags adidas shoes ugg boots yeezy 350 v2 ugg boots outlet the north face canada goose canada ugg outlet adidas outlet clearance polo ralph lauren shirts cheap jordan shoes michael kors uk ray ban sunglasses cheap nfl jerseys ralph lauren italia coach outlet longchamp outlet online adidas outlet store uggs slippers yeezy boost 350 v2 pandora charms columbia outlet adidas wings michael kors uk burberry outlet ugg clearance ray ban sunglasses canada goose outlet birkenstock outlet ugg australia true religion uk oakley sunglasses cheap ray ban sunglasses canada goose clearance nike nfl jerseys fitflops sale moncler uk nhl jerseys wholesale prada outlet uggs outlet online cheap jerseys coach outlet cheap jordans cheap oakley sunglasses uggs outlet swarovski crystal oakley sunglasses michael kors ugg boots ugg boots outlet michael kors handbags prada handbags mac cosmetics makeup ugg boots coach outlet ugg boots authentic nfl jerseys coach outlet ray ban sunglasses red bottoms ralph lauren polo oakley sunglasses ray ban sunglasses oakley sunglasses christian louboutin shoes salvatore ferragamo north face jackets jordan shoes kate spade outlet uggs clearance ugg boots clearance dior sunglasses michael kors canada ugg boots clearance pandora jewelry ray ban uk coach bags the north face outlet uggs outlet tory burch outlet online oakley sunglasses wholesale michael kors outlet ugg canada ralph lauren españa true religion jeans cheap nfl jerseys nike factory outlet ray ban sunglasses michael kors outlet 75% off coach outlet online 70% off pandora canada d&g sunglasses tory burch outlet online ugg slippers michael kors damenuhr ugg factory outlet nike air max online under armour clearance adidas jeremy scott coach factory outlet ugg outlet ralph lauren shirts cheap oakley sunglasses converse shoes adidas soccer cleats ugg outlet montblanc pen tory burch coach factory online oakley sunglasses cheap ray ban zonnebril sale nfl jerseys coach outlet store online coach handbags coach wallets mulberry bags coach outlet online chenyingying20170908