By David Wiseman (Administrator)Created 04 Mar 2008
My Rating:
Vote
Rating:
Not Rated
Views:7271
Downloads:81

Search for All Users Who Have a Home Directory

Language:  PowerShell

Compatibility

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

Sample script that searches Active Directory for all the users who have a home directory. The homeDirectory attribute is not replicated to the Global Catalog; you cannot connect to a Global Catalog server and search across the forest for all users who have an assigned home directory. Note that this attribute is not automatically populated any time you create a user account.

Code

Line Numbers: On  Off      Plain Text
$strFilter = "(&(objectCategory=User)(homeDirectory=*))"

$objDomain = New-Object System.DirectoryServices.DirectoryEntry

$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.PageSize = 1000
$objSearcher.Filter = $strFilter

$colProplist = "name"
foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}

$colResults = $objSearcher.FindAll()

foreach ($objResult in $colResults)
    {$objItem = $objResult.Properties; $objItem.name}

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
areatruck
Posted On: 1/5/2019 4:33:58 AM [Edited 1/5/2019 4:34:45 AM]

Enumerates all startup commands on a computer, including those found in the Startup folder and those found in the Registry. happy wheels apk online.

qzyfffff
Posted On: 1/12/2019 8:25:22 AM

offwhite yeezy boost 350 yeezy 500 vans outlet replica rolex jordans balenciaga adidas shoes jordan 6 adidas ultra boost westbrook shoes adidas tubular shadow chrome hearts nike flyknit racer michael kors outlet nfl jerseys cheap nba jerseys off white shoes jordan shoes michael kors handbags balenciaga fila nike air max 2018 fila shoes cheap nfl jerseys nike air max 2017 adidas yeezy fila disruptor nike air huarache curry 4 shoes golden goose outlet golden goose fila nike hyperdunk hermes handbags bag yeezy hermes handbags for sale goyard crazy explosive coach handbags nike sneakers for men kyrie irving shoes pandora bracelet off white fake rolex michael kors handbags kobe sneakers moncler jackets cheap jordans nike react yeezy boost 350 golden goose outlet adidas tubular nike kd 11 nike react louboutin shoes balenciaga triple s yeezy boost 350 v2 yeezy boost 350 v2 adidas shoes outlet off white clothing jordan shoes adidas stan smith sneakers adidas nmd r1 lebron 16 nike flyknit nike polo shirts kd shoes kd 11 lebron 16 shoes nike cortez men nfl store red bottoms hermes handbags lebron 16 shoes james harden shoes yeezy boost 350 golden goose outlet michael kors outlet online goyard bag air max 2019 adidas ultra boost uncaged lacoste online shop goyard handbags cat boots goyard bag balenciaga nike air max lebron 11 hermes belt michael kors handbags tory burch shoes nike huarache air max 270 hermes belts for men adidas tubular balenciaga shoes yeezy boost 350 coach outlet caterpillar boots adidas ultra boost fake rolex hogan outlet online golden goose kate spade handbags air jordan 4 yeezy shoes nike shoes red bottom shoes lacoste polo kd shoes lebron james shoes timberland outlet nike sneakers for women nike air max 90 yeezy shoes yeezy shoes curry 5 yeezy shoes adidas nmd off white adidas yeezy kobe shoes off white nike ultra boost fila shoes yeezy shoes fitflops gucci belt yeezy nhl jerseys timberland boots yeezy kd shoes yeezy boost 350 nike epic react hermes belt hermes birkin golden goose sneakers nike vapormax kevin durant shoes adidas zx flux adidas pure boost yeezy boost polo ralph lauren air jordan supreme hoodie valentino shoes nike cortez nike lebron 16 kd 11 shoes asics shoes vapormax jimmy choo shoes chrome hearts coach factory outlet kobe byrant shoes birkin bag adidas stan smith michael kors outlet online michael kors nike air max 2019 nike polo nike shox nike roshe run lacoste outlet adidas crazy explosive michael kors handbags fila shoes goyard handbags mbt shoes curry 4 jordan shoes mbt shoes online coach outlet online fila sneakers off white hoodie yeezy boost 350 v2 calvin klein outlet yeezys cheap jordans adidas tubular longchamp outlet basketball shoes kyrie 3 retro jordans links of london yeezy boost 350 michael kors purses yeezy boost lacoste outlet adidas gazelle yeezy boost 700 air yeezy chrome hearts online curry 4 lebron shoes asics running shoes goyard handbags nike foamposite coach outlet sale air max 2018 hermes belt kyrie 4 shoes jordan retro 6 adidas superstars goyard bags cheap nba jerseys hermes outlet online michael kors outlet air jordans russell westbrook shoes yeezy boost 350 v2 hermes bags jordan 12 lacoste polo shirts longchamp handbags fitflops sale clearance yeezys longchamp kd 10 birkin bag ralph lauren uk jordan 4 golden goose sneakers ysl handbags lacoste polo converse outlet store nike air max nmd valentino ysl longchamp bags converse outlet harden shoes adidas stan smith shoes adidas eqt support yeezy boost fila hogan outlet nike basketball shoes nike air max goyard canada goose jacket coach factory outlet yeezy boost paul george shoes nike epic react retro jordans iniki bape hoodie moncler jacket nike air max jordan shoes cheap mlb jerseys adidas yeezy adidas outlet online canada goose fila yeezy boost 350 air jordan curry 5 balenciaga shoes nike air max 270 stephen curry 5 golden goose nike roshe calvin klein outlet online michael kors outlet michael kors outlet online rolex replica bape hoodie ferragamo belt yeezy boost 350 michael jordan shoes michael kors handbags off white hoodie nike shox for men jordans red bottom heels coach outlet kobe 9 goyard bags ralph lauren uk nmd michael kors outlet hermes online shop jordan retro pure boost golden goose outlet adidas outlet balenciaga shoes fake rolex watches balenciaga sneakers nike air force 1 coach outlet chrome hearts online jordan shoes adidas iniki coach outlet yeezy boost gucci belts golden goose sneakers kd 11 stephen curry 5 nike huarache air jordan 13 birkin bag coach outlet sale goyard wallet michael kors handbags lebron shoes ferragamo belt vans shoes michael kors outlet jordan 13 adidas yeezy boost fila shoes ferragamo belts tory burch outlet nike sneakers kobe 9 lebron 10 yeezy boost 350 v2 lebron 16 adidas shoes online yeezy shoes yeezy boost 500 michael kors jordan 11 cheap jordans links of london outlet store nike max lebron 15 shoes supreme hoodie hermes handbags off white clothing goyard st louis tot reebok outlet air max 90 chrome hearts moncler jackets nike jordans jordan sneakers off white x jordan 1 golden goose sneakers yeezy boost golden goose michael kors factory outlet adidas stan smith nba jerseys coach outlet online adidas superstar golden goose tory burch off white shoes adidas yeezy tory burch sandals yeezy boost 350 yeezy 700 jordans lacoste adidas nmd kyrie 4 golden goose adidas nmd cheap jordans air force 1 yeezy boost kobe basketball shoes birkin bag golden goose outlet michael kors uk reebok shoes jordan 11 retro baseball jerseys 100% real jordans for cheap adidas nmd runner supreme clothing nike air force lebron 16 ferragamo belts louboutin shoes uk moncler outlet jordan retro 12 Kanye West shoes lebron 15 air max christian louboutin off white lacoste polo yeezy shoes michael kors handbags outlet zx flux yeezy boost 350 v2 pandora jewelry kobe 11 adidas eqt kyrie shoes adidas ultra kobe 11 off white clothing yeezy 500 mbt shoes outlet chrome hearts online kobe shoes off white jordan 1 michael kors outlet mlb jerseys

happywheelspace
Posted On: 8/13/2019 8:08:43 AM

Mostly used by everyone, happy wheels unblocked

RobertSharph
Posted On: 10/1/2019 8:39:05 AM

You're my end and my beginning Even when I lose I'm winning 'Cause I give you all, all of me And you give me all, all of you io game


Posted On: 10/9/2019 8:02:51 AM

Your feedback helps me a lot, A very meaningful event, I hope everything will go well enble flash in chrome

nguyenthaovan0606
Posted On: 11/23/2019 1:32:49 AM

Thanks a lot for the post. It has helped me get some nice ideas. I hope I will see some really good result soon. This is really a great stuff for sharing. Keep it up .Thanks for sharing. gmail sign up hotmail email login


Posted On: 12/19/2019 1:38:40 AM [Edited 12/19/2019 1:39:41 AM]

I personally like your post, you have shared good article. It will help me in great deal. gmail sign up

se
Russian Federation
Posted On: 1/2/2020 12:47:31 PM

Accordingly, the reintegration process may involve some challenges, especially for youth offenders. Juvenile correctional facilities and community-based organizations partner together to prevent recidivism among delinquents and to maintain a safe society https://essaybaron.com/assignment-expert

alex1999
Posted On: 1/3/2020 11:26:24 AM

Dell support number, Dell printer support number, Dell printer technical support phone number , Dell printer support phone number, Dell printer customer service phone number, Dell printer customer support phone number, Lexmark printer support phone number, Lexmark printer technical support phone number, Lexmark printer customer support phone number, Lexmark support number, Lexmark printer tech support number, Lexmark technical support phone number, Lexmark phone number, Lexmark technical support number, Lexmark support phone number, lexmark printer technical support number, Lexmark customer service phone number, kodakverite support kodak customer service kodak support kodak phone number kodak contact kodak verite support kodak customer service phone number kodak printer customer service kodak number kodak customer service toll free number kodak support number kodak customer support kodak customer service number call kodak kodak help kodak customer support number kodak service and support kodak contact number kodak customer service telephone number kodak printer customer support number kodak helpline number kodak toll free number kodak support phone number kodak printer phone number kodak support drivers kodak customer support phone number kodak printer customer service phone number kodak help number kodak printer helpline kodak telephone number kodak printer customer service number kodak printer customer support kodak printer contact number kodak printer customer support phone number kodak printer contact kodak printer number kodak printer customer care number kyocera customer service kyocera support kyocera contact kyocera phone number kyocera customer service number kyocera customer care number kyocera support number kyocera customer service phone number kyocera contact number kyocera customer support kyocera help kyocera number kyocera printer customer service kyocera customer care kyocera support drivers kyocera helpline number kyocera support phone number kyocera help desk kyocera customer care phone number kyocera customer support number kyocera customer service telephone number panasonic customer service panasonic support panasonic phone number panasonic customer service number panasonic customer support panasonic customer service phone number panasonic support phone number panasonic telephone support panasonic customer service 24 hours panasonic help panasonic contact panasonic contact number panasonic support number panasonic customer care number panasonic telephone number panasonic printer customer service ricoh support ricoh customer service ricoh phone number ricoh usa phone number ricoh support number ricoh contact number ricoh help desk ricoh customer support ricoh service phone number ricoh customer service phone number ricoh printer customer service ricoh printer customer care number ricoh printer helpline number ricoh printer phone number ricoh printers contact number ricoh printer customer service number ricoh printer customer support ricoh printer contact ricoh printer customer service phone number ricoh printers customer care toll free number ricoh printers customer support ricoh printer number samsung customer service samsung support samsung phone number samsung contact samsung customer care number samsung support number samsung help samsung number samsung customer support samsung customer service phone number samsung customer care samsung contact number samsung call center samsung support chat samsung helpline samsung live chat samsung customer service chat call samsung customer service samsung 800 number samsung 1800 number samsung support phone number samsung phone customer service samsung telephone number samsung us support contact samsung support samsung help center samsung contact us samsung help number samsung support centre samsung customer service hours samsung customer service center call samsung support samsung support live chat samsung customer support number call samsung customer support samsung customer service telephone number samsung online support samsung help chat samsung customer support phone number samsung care number samsung help desk samsung contact phone number support samsung samsung customer care phone number samsung support us contact samsung customer service samsung support hours samsung help phone number samsung printer phone number samsung printer contact number samsung printer customer service phone number samsung printer customer support number samsung laser printer customer care number samsung printer call center samsung printer contact samsung printer number samsung printer customer support phone number samsung printer customer care toll free number samsung printer toll free number sharp customer service sharp support sharp customer service number sharp phone number sharp customer care number sharp contact sharp number sharp contact number sharp customer support sharp support number sharp customer service phone number sharp usa support sharp printer customer service sharp printer customer care number xerox support xerox customer service xerox call center xerox support number xerox phone number xerox customer support xerox customer service number xerox contact xerox number xerox help desk xerox customer support number xerox support chat xerox help xerox customer service phone number xerox support phone number xerox printer customer service xerox printer setup xerox printer customer support number xerox printer customer service number xerox printer customer care number xerox printer toll free number xerox printer phone number xerox printer customer support phone number xerox printer contact number xerox printer customer support

alex1999
Posted On: 1/3/2020 11:26:45 AM

I am completely agree with you, I am an amazing fan of your site, genuine guard post Keep making such stunning post independent support Official support OEM support independent third party support Voice support support phone number support number customer service number customer support number customer service phone number customer support phone number google voice number google voice setup google voice phone number google voice customer service google voice number setup google voice help google voice 800 number google voice customer service number google voice service google voice support number google voice customer service phone number google voice 1800 number google voice contact number google voice toll free number google voicemail number match customer service match phone number match com customer service number match com customer service phone number match customer service phone number match customer service number match number match contact number match com contact match com help match phone contact match by phone match customer care contact match nuance support nuance technical support nuance customer service nuance dragon support dragon naturally speaking support dragon support nuance customer support www nuance com support nuance phone number dragon nuance support nuance tech support dragon naturally speaking customer service nuance support number nuance help dragon naturally speaking technical support nuance support phone number nuance customer service phone number dragon naturally speaking phone number dragon naturally speaking support phone number qsee support q see customer service qsee customer service q see camera support q see phone number qsee support phone number q see contact q see quick support qsee customer service phone number q see customer service number q see camera customer service number q see customer support number q see live chat q see chat support skype phone number skype number skype customer service skype phone skype support skype help skype customer service phone number skype customer service phone number 1800 skype setup skype customer service number skype support phone number skype support number skype customer service 1 800 skype support chat snapchat support snapchat help snapchat contact snapchat number snapchat customer service snapchat phone number snapchat support number snapchat customer service number how to contact snapchat how to email snapchat snapchatsupport snapchat support email call snapchat snapchat call snapchat contact number snapchat support phone number snapchat customer service phone number snapchat contact us snapchat customer support snapchat help center tinder support tinder customer service tinder contact tinder phone number tinder customer support tinder customer service number tinder chat tinder support number contact tinder support tinder number tinder customer service phone number tinder contact number how to contact tinder tinder help email email tinder tinder customer support number call tinder tinder helpline


Posted On: 1/23/2020 12:54:47 PM



Posted On: 1/23/2020 12:55:06 PM



Posted On: 1/23/2020 12:55:07 PM



Posted On: 1/23/2020 12:55:23 PM



Posted On: 1/23/2020 12:55:41 PM


12