By David Wiseman (Administrator)Created 20 Aug 2006, Modified 23 Feb 2008
My Rating:
Vote
Rating:
Not Rated
Views:23164
Downloads:377

Get the distinguished name (DN) of a Computer

Language:  VBScript

Compatibility

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

Get the distinguished name of a computer by specifying the NETBIOS domain name and NETBIOS computer name. This sample script will get the distinguished name of the current computer.

Code

Line Numbers: On  Off      Plain Text
' Constants required for name translate
Const ADS_NAME_INITTYPE_GC = 3
Const ADS_NAME_TYPE_NT4 = 3
Const ADS_NAME_TYPE_1779 = 1

'Get the NETBIOS name of the domain
Set objSystemInfo = CreateObject("ADSystemInfo") 
strDomain = objSystemInfo.DomainShortName

' Get the name of the computer
set objNetwork = createobject("Wscript.Network")
strComputer = objNetwork.ComputerName

' Call function to return the distinguished name (DN) of the computer
strComputerDN = getComputerDN(strComputer,strDomain)

wscript.echo strComputerDN


function getComputerDN(byval strComputer,byval strDomain)
	' Function to get the distinguished name of a computer
	' from the NETBIOS name of the computer (strcomputer)
	' and the NETBIOS name of the domain (strDomain) using
	' name translate

	Set objTrans = CreateObject("NameTranslate")
	' Initialize name translate using global catalog
	objTrans.Init ADS_NAME_INITTYPE_GC, ""
	' Input computer name (NT Format)
	objTrans.Set ADS_NAME_TYPE_NT4, strDomain & "\" & strComputer & "$"
	' Get Distinguished Name.
	getComputerDN = objTrans.Get(ADS_NAME_TYPE_1779)

end function

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      

Posted On: 9/4/2018 1:21:47 AM

hogan gucci shoes softball bats new balance calvin klein outlet boy london clothing hermes bags nike air max 2017 kevin durant jersey wedding dress oakley sunglasses omega watches jordan 14 michael jordan tommy hilfiger converse all stars abercrombie clarisonic mia kenzo clothing basketball jersey montre homme nike blazer polo lacoste pas cher nike air zoom pegasus adidas outlet armani handbags nike roshe nike outlet cartier sunglasses ralph lauren outlet ferragamo belt dior sunglasses nike pas cher mont blanc pens rolex watches air max 2018 chrome hearts jewelry nike free cheap wedding dresses jordan 10 vans scarpe prada sunglasses burberry outlet cheap oakley sunglasses new balance femme fossil handbags nike vapor max oakley sunglasses celine handbags michael kors outlet online dak prescott jersey nike air oakley glasses new balance trainer replica watches air max babyliss pro nano titanium christian louboutin shoes karen millen adidas outlet store basketball shoes herve leger dresses marc jacobs handbags armani sunglasses ferragamo sunglasses converse uk england world cup jersey jordan 3 new balance shoes hollister outlet nike free run spain world cup jersey christian louboutin gentle monster sunglasses dolce & gabbana saint laurent handbags longchamp pas cher vans pas cher polo ralph lauren adidas zx flux mont blanc pens bcbg max azria g-star jeans arcteryx jackets coach purse coach outlet miu miu shoes mizuno running shoes adidas outlet store jordan 8 tory burch nike outlet online oakley pas cher nike shoes polo ralph lauren instyler pandora uk bose headphones true religion jeans chopard jewelry adidas crazy giuseppe zanotti outlet timberland boots mizuno true religion isabel marant shoes kate spade uk kobe bryant shoes nike air max 97 chloe handbags hogan shoes argentina world cup jersey lululemon outlet bally shoes insanity workout adidas running shoes ralph lauren lunette ray ban ralph lauren outlet new balance shoes polo ralph lauren kevin durant shoes swarovski jewelry supra shoes jordan xx9 givenchy jewelry 10 deep clothing kobe 11 air force 1 dansko outlet hermes nike shoes jordan 3 iphone x case jordan 4 ray ban sunglasses jordan 2 pandora bracciali chanel outlet beats headphones givenchy handbags nike air max antonio brown jersey timberland pas cher kobe 9 elite jordan 12 furla handbags nike clothing softball bats karen millen fitflops oakley vault lacoste jeans skechers sneakers beats by dre adidas shoes montre pas cher jimmy choo sunglasses oakley uk ghd hair straighteners longchamp outlet germany world cup jersey new balance soldes tommy hilfiger pandora jewelry kd 9 ray ban nike uk michael kors true religion christian louboutin lebron shoes jordan nike air max 90 vans outlet puma shoes france world cup jersey michael kors uk cheap jerseys michael kors outlet polo ralph lauren tory burch outlet nike air max mizuno nike air max jordan 1 bathing ape clarks shoes barbour nike mercurial nike outlet jordan 32 ray ban pas cher basket nike polo ralph lauren air force one mac cosmetics online adidas outlet store cartier bracelet mac cosmetics kates pade outlet online roshe run hermes birkin jordan pandora charms kyrie 4 tods shoes chloe handbags tn pas cher nike outlet nike air max alife clothing kids jordans jordan 7 soccer jerseys parajumpers fitflops insanity workout christian louboutin pas cher cheap oakley sunglasses guess handbags nike air max jordan pas cher jordan 6 sac longchamp salomon shoes giannis antetokounmpo jersey nike roshe run christian louboutin mulberry longchamp handbags nike free swarovski gioielli timberland boots brazil world cup jersey air max 95 converse jordan replica watches ralph lauren bulgari jewelry nike air force 1 aaron rodgers jersey rolex watches kevin durant shoes james harden jersey huf clothing nike huarache nike canada ray ban sunglasses gucci outlet jordan 6 coach outlet online air max guess air jordan true religion outlet nike blazer prada pandora jewelry goyard handbags nike air max 2017 curry 4 guess factory champion clothing burberry sunglasses cheap jerseys harry winston jewelry chloe sunglasses lebron 11 designer sunglasses michael kors uk abercrombie bcbg dresses christian louboutin yeezy shoes reebok outlet jordan 9 nike air max 95 prada outlet dyson hair dryer tory burch nfl jerseys dolce & gabbana orologi rolex converse outlet store supra shoes insanity adidas superstar bottega veneta sunglasses nike roshe gucci handbags converse shoes fendi sunglasses balenciaga sneakers true religion outlet burberry sale lululemon outlet nike air max ray ban sunglasses burberry beats headphones nike air max hermes bags nike blazer nike mercurial nike roshe run adidas trainers uk bottega veneta iphone cases lebron shoes cheap jordans toms outlet abercrombie adidas slides keen sandals nike outlet store guess canada burberry abercrombie and fitch carrera sunglasses michael kors outlet sac michael kors portugal world cup jersey fitflops outlet oakley sunglasses ai max ray ban sunglasses michael jordan nike mercurial superfly adidas soccer air max 90 occhiali oakley jordan 4 ferragamo lacoste shoes replica watches red bottom shoes prada handbags adidas soccer cleats chrome hearts jewelry michael kors outlet tiffany jewelry converse chuck taylor nfl jerseys asics gel adidas outlet store nike roshe jordan 5 chaussure nike longchamp bottega veneta coach factory outlet dsquared2 jeans salvatore ferragamo chi flat iron jordan shoes toms shoes ed hardy ferragamo marc jacobs handbags dolce & gabbana sunglasses michael kors canada gucci outlet sac vanessa bruno jordan lunette oakley kristaps porzingis jersey reebok shoes ghd flat iron barbour jackets cheap jordan shoes scarpe hogan chanel handbags belgium world cup jerseys manolo blahnik shoes swarovski crystal nike foamposite alexander mcqueen handbags air max 90 jimmy choo furla handbags hollister air more uptempo kate spade dansko shoes cheap wedding dresses nike free ray ban sunglasses dsquared2 outlet kyrie irving jersey michael kors handbags freshjive clothing golden goose sneakers nike roshe run air max plus ray ban occhiali prom dresses kd 10 longchamp handbags vibram fivefingers ferragamo shoes louboutin pas cher michael kors handbags carson wentz jersey dolce & gabbana adidas originals tommy hilfiger pas cher nike free run diesel jeans burberry outlet versace handbags converse curry 3 ray ban jordan clothing hermes jewelry bvlgari sunglasses armani jeans nike free run reebok shoes flip flops asics gel vans outlet chanel outlet true religion jeans curry 5 nike factory ferragamo shoes dior bags nike air max 90 valentino fendi handbags calvin klein jeans asics running shoes gucci belt nike store kobe 12 jordan 31 ai max adidas flip-flops beats pill links of london uk burberry clothing pandora bijoux oakley sunglasses marc jacobs handbags air max 90 adidas superstar stuart weitzman shoes nike kyrie 2 michael kors asics trainers jordan 13 mac makeup air jordan nike shoes curry 2 jbl headphones ghd fendi basket store louboutin outlet stuart weitzman jimmy choo shoes jordan 11 sac michael kors burberry handbags kobe 10 balmain jeans montres pandora charms bape clothing jordans mac makeup michael jordan adidas clothing longchamp outlet bijoux swarovski michael kors outlet michael kors 2018.9.4xukaimin

xiaoou
Posted On: 11/13/2018 3:17:14 AM

michael kors uk burberry ugg boots germany world cup jersey michael kors outlet true religion outlet jordan adidas zx flux ralph lauren outlet nike outlet lebron 11 armani handbags timberland pas cher jordan 6 ray ban sunglasses sac michael kors dyson hair dryer burberry outlet dolce & gabbana stuart weitzman belgium world cup jerseys montres lunette ray ban ferragamo cheap uggs wedding dress michael kors canada ray ban occhiali dsquared2 jeans 10 deep clothing harry winston jewelry new balance soldes oakley pas cher toms shoes prada tory burch golden goose sneakers air max 2018 iphone cases kate spade outlet nike air max beats headphones jordan 12 ralph lauren jordan 6 boy london clothing sac longchamp converse uk nike air max mizuno kevin durant shoes givenchy handbags michael kors outlet bottega veneta sunglasses nike store abercrombie tory burch outlet curry 2 replica watches mac makeup prada outlet ray ban sunglasses keen sandals adidas flip-flops montre homme pandora jewelry jimmy choo sunglasses bcbg max azria louboutin outlet gucci outlet moncler outlet iphone x case prada sunglasses manolo blahnik shoes dsquared2 outlet air more uptempo adidas shoes bally shoes g-star jeans adidas trainers uk ray ban vans outlet ed hardy jordan pas cher soccer jerseys basketball jersey hermes birkin fossil handbags guess canada michael kors kobe 10 nike air max curry 4 hollister outlet lebron shoes longchamp handbags nike free burberry outlet alife clothing nike air max nike outlet nike huarache nike blazer chanel handbags nike foamposite arcteryx jackets roshe run michael jordan asics gel barbour jackets timberland boots air jordan cartier sunglasses ugg outlet vans scarpe beats headphones toms outlet karen millen beats by dre jordan 13 spain world cup jersey michael kors uk carson wentz jersey oakley uk nike air zoom pegasus barbour isabel marant shoes guess nike air max 2017 pandora charms nike air force 1 jordan 31 air max swarovski gioielli oakley sunglasses air jordan polo ralph lauren jordan 5 sac vanessa bruno furla handbags adidas outlet store basketball shoes prom dresses new balance shoes nfl jerseys balmain jeans occhiali oakley adidas outlet store scarpe hogan christian louboutin christian louboutin shoes ghd flat iron jordan 7 nike roshe run true religion jeans chopard jewelry mac makeup jordan 9 dolce & gabbana coach outlet michael kors outlet lululemon outlet softball bats ralph lauren outlet supra shoes jordan clothing swarovski jewelry bulgari jewelry replica watches longchamp ray ban gucci handbags adidas soccer cleats hogan nike blazer reebok shoes replica watches portugal world cup jersey mac cosmetics jordan 14 insanity oakley glasses carrera sunglasses chanel outlet curry 3 burberry sunglasses pandora charms cheap wedding dresses valentino ray ban sunglasses nike outlet kobe 9 elite versace handbags uggs outlet nike roshe run nike kyrie 2 michael jordan christian louboutin diesel jeans ugg boots huf clothing calvin klein outlet cheap wedding dresses nike mercurial nike outlet online insanity workout basket nike oakley vault adidas outlet store ghd celine handbags burberry sale asics trainers moncler jackets gentle monster sunglasses england world cup jersey jordan 8 adidas running shoes vans outlet clarisonic mia longchamp pas cher jordan 32 ferragamo sunglasses uggs outlet karen millen air force 1 pandora jewelry yeezy shoes nike air max 90 polo ralph lauren polo ralph lauren nike roshe run fitflops alexander mcqueen handbags christian louboutin pas cher mizuno ferragamo marc jacobs handbags seahawks jerseys mont blanc pens lacoste jeans nfl jerseys kd 10 nike pas cher balenciaga sneakers montre pas cher jimmy choo shoes nike free run polo ralph lauren canada goose jackets nike roshe france world cup jersey tn pas cher cheap jordans tory burch burberry kyrie irving jersey ugg jimmy choo converse kevin durant shoes chloe sunglasses converse outlet store burberry clothing tommy hilfiger pas cher prada handbags lebron shoes longchamp outlet longchamp outlet bathing ape new balance trainer kate spade uk nike air max 90 coach handbags uggs outlet coach factory outlet ai max vibram fivefingers goyard handbags guess factory fendi rolex watches polo ralph lauren argentina world cup jersey flip flops tommy hilfiger ugg boots hermes aaron rodgers jersey adidas superstar salomon shoes jordan 11 new balance nike free cheap jordan shoes new balance femme hermes bags nike blazer adidas superstar michael kors handbags kate spade kd 9 sac michael kors air max 90 omega watches nike air max 2017 true religion jordan nike free run gucci belt calvin klein jeans eagles jersey asics gel orologi rolex skechers sneakers freshjive clothing fendi handbags insanity workout polo lacoste pas cher jordan 10 air max 90 adidas soccer chloe handbags michael kors outlet nike shoes pandora uk nike vapor max links of london uk miu miu shoes nike uk hermes jewelry swarovski crystal chrome hearts jewelry supra shoes air max plus true religion jeans furla handbags christian louboutin nike shoes burberry handbags canada goose jackets nike roshe designer sunglasses james harden jersey champion clothing basket store ray ban sunglasses louboutin pas cher nike mercurial superfly adidas crazy kevin durant jersey bcbg dresses rolex watches guess handbags adidas outlet store kobe bryant shoes coach purse pandora bracciali michael kors nike free run air force one lacoste shoes longchamp handbags nike air max dolce & gabbana dansko outlet saint laurent handbags vans pas cher brazil world cup jersey ghd hair straighteners marc jacobs handbags clarks shoes air max 90 nike air nike air max michael jordan parajumpers converse shoes gucci shoes christian louboutin oakley sunglasses reebok outlet jimmy choo dansko shoes true religion outlet oakley sunglasses lunette oakley kates pade outlet online ferragamo shoes bijoux swarovski timberland boots jordan 4 adidas slides curry 5 ray ban sunglasses christian louboutin air max 95 bottega veneta nike roshe jordan ray ban pas cher coach outlet ferragamo shoes chi flat iron jordan xx9 cheap oakley sunglasses kyrie 4 jordan shoes bape clothing armani sunglasses bose headphones fendi sunglasses nike air max kobe 11 hermes bags kids jordans dolce & gabbana sunglasses red bottom shoes hollister bvlgari sunglasses jordan 2 true religion tods shoes coach outlet online pandora bijoux fitflops outlet hogan shoes michael kors handbags nike free cheap jerseys abercrombie and fitch moncler jackets michael kors armani jeans babyliss pro nano titanium softball bats nike canada oakley sunglasses giannis antetokounmpo jersey jordan 1 adidas outlet abercrombie cheap oakley sunglasses nike air force nike shoes giuseppe zanotti outlet mizuno running shoes marc jacobs handbags kristaps porzingis jersey nike factory air max adidas clothing converse all stars jordan 3 nike air max 97 chaussure nike ferragamo belt nike air max 95 nike outlet store chanel outlet kobe 12 jbl headphones givenchy jewelry coach outlet michael kors outlet online salvatore ferragamo cheap jerseys jordan puma shoes cartier bracelet tommy hilfiger nike clothing mont blanc pens converse chuck taylor abercrombie herve leger dresses converse kenzo clothing stuart weitzman shoes nike mercurial tiffany jewelry timberland boots dak prescott jersey jordans ai max ralph lauren beats pill gucci outlet lululemon outlet instyler adidas originals mulberry asics running shoes antonio brown jersey madrid jersey fitflops chrome hearts jewelry chloe handbags 2018.11.13xukaimin