Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB

  1. @echo off
  2. REM chkgpttmpl domain_name
  3. REM e.g. chkgpttmpl africa.corp.microsoft.com
  4. REM
  5. REM Check version of policy template file.
  6. REM
  7. REM "\\<dcname>\
  8. REM sysvol\
  9. REM northamerica.corp.microsoft.com\
  10. REM Policies\
  11. REM {6AC1786C-016F-11D2-945F-00C04fB984F9}\
  12. REM Machine\
  13. REM Microsoft\
  14. REM Windows NT\
  15. REM SecEdit\
  16. REM GPTTMPL.INF"
  17. if "%1"=="" goto :USAGE
  18. set dom_name=%1
  19. set filename=sysvol\%dom_name%\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\Machine\Microsoft\Windows NT\SecEdit\GPTTMPL.INF
  20. REM get list of DCs in a domain with:
  21. REM
  22. REM >nltest /dclist:africa
  23. REM Get list of DCs in domain 'africa' from '\\AFRICA-DC-03'.
  24. REM AFRICA-DC-04.africa.corp.microsoft.com [DS] Site: NA-WA-EXCH
  25. REM AFRICA-DC-03.africa.corp.microsoft.com [PDC] [DS] Site: NA-WA-RED
  26. REM JOB-DC-01.africa.corp.microsoft.com [DS] Site: AF-ZA-JOB
  27. REM
  28. nltest /dclist:%dom_name% > dclist.tmp
  29. type dclist.tmp
  30. FOR /F "eol=; tokens=1 delims=, " %%i in (dclist.tmp) do (
  31. if /i not "%%i"=="get" (
  32. if /i not "%%i"=="the" (
  33. @echo %%i
  34. dir "\\%%i\%filename%"
  35. sc \\%%i query ntfrs
  36. )
  37. )
  38. )
  39. goto :QUIT
  40. :USAGE
  41. echo chkgpttmpl domain_name
  42. echo e.g. chkgpttmpl africa.corp.microsoft.com
  43. :QUIT