脚本之家,脚本语言编程技术及教程分享平台!
分类导航

Python|VBS|Ruby|Lua|perl|VBA|Golang|PowerShell|Erlang|autoit|Dos|bat|

服务器之家 - 脚本之家 - VBS - vbs AD日志开启脚本nableKerbLog的脚本

vbs AD日志开启脚本nableKerbLog的脚本

2020-07-21 11:04VBS脚本之家 VBS

本文主要讲解用vbs AD日志开启脚本nableKerbLog的脚本,有需要的朋友可以参考下

  1. Dim wsObj  
  2. Set wsObj = CreateObject("Wscript.Shell")  
  3.  
  4. ' Add the LogLevel Value to Kerberos Key in Registry.  
  5. On Error Resume Next   
  6. WScript.Echo "Enabling Kerberos Logging..."  
  7. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\1 Knowledge Consistency Checker",3,"REG_DWORD"  
  8. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\2 Security Events",3,"REG_DWORD"  
  9. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\3 ExDS Interface Events",3,"REG_DWORD"  
  10. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\4 MAPI Interface Events",3,"REG_DWORD"  
  11. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\5 Replication Events",3,"REG_DWORD"  
  12. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\6 Garbage Collection",3,"REG_DWORD"  
  13. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\7 Internal Configuration",3,"REG_DWORD"  
  14. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\8 Directory Access",3,"REG_DWORD"  
  15. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\9 Internal Processing",3,"REG_DWORD"  
  16. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\10 Performance Counters",3,"REG_DWORD"  
  17. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\11 Initialization/Termination",3,"REG_DWORD"  
  18. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\12 Service Control",3,"REG_DWORD"  
  19. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\13 Name Resolution",3,"REG_DWORD"  
  20. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\14 Backup",3,"REG_DWORD"  
  21. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\15 Field Engineering",3,"REG_DWORD"  
  22. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\16 LDAP Interface Events",3,"REG_DWORD"  
  23. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\17 Setup",3,"REG_DWORD"  
  24. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\18 Global Catalog",3,"REG_DWORD"  
  25. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\19 Inter-site Messaging",3,"REG_DWORD"  
  26. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\20 Group Caching",3,"REG_DWORD"  
  27. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\21 Linked-Value Replication",3,"REG_DWORD"  
  28. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\22 DS RPC Client",3,"REG_DWORD"  
  29. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\23 DS RPC Server",3,"REG_DWORD"  
  30. wsObj.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\24 DS Schema",3,"REG_DWORD"  
  31. Set wsObj = Nothing   
  32. WScript.Echo "-=[Complete!]=-"  

延伸 · 阅读

精彩推荐