Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for Natalie Green's createadliststart.bat

(view source code of ng_createadliststart.bat as plain text)

  1. @echo off
  2. :: This script is the first one run to start gathering host info from domain.
  3. :: Normally, it will use the current domain, but can connect to a trusting domain,
  4. :: like a sub-domain.
  5. :: This script can accept a filename as input which contains a line:
  6. :: A working FQDN with domain controller for the specified sub-domain. Example:
  7. :: domaincontroller1.subdomain.mydomain.com
  8.  
  9. IF "%1"=="" GOTO :UseCurrentDomain
  10. :: Get TLD of FQDN from value stored in filename entered, for display in CMD window title
  11. FOR /F "tokens=2 delims=." %%a IN ('TYPE %1') DO SET LDAPSTRING=%%a
  12. ECHO LDAPSTRINGFile=%1
  13. START "CreateADList" /MIN CreateADList.bat %1
  14. ECHO "CreateADList.bat" %LDAPSTRING% started in external window!
  15.  
  16. GOTO :EOF
  17.  
  18. :UseCurrentDomain
  19. START "CreateADList" /MIN CreateADList.bat
  20. ECHO "CreateADList.bat" started in external window!
  21.  

page last uploaded: 2017-08-21, 14:26