欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-04-10 08:05:39
dim wsobj set wsobj = createobject("wscript.shell") ' add&nbs...
dim wsobj
set wsobj = createobject("wscript.shell")

' add the loglevel value to kerberos key in registry.
on error resume next 
wscript.echo "enabling kerberos logging..."
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\1 knowledge consistency checker",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\2 security events",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\3 exds interface events",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\4 mapi interface events",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\5 replication events",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\6 garbage collection",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\7 internal configuration",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\8 directory access",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\9 internal processing",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\10 performance counters",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\11 initialization/termination",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\12 service control",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\13 name resolution",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\14 backup",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\15 field engineering",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\16 ldap interface events",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\17 setup",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\18 global catalog",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\19 inter-site messaging",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\20 group caching",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\21 linked-value replication",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\22 ds rpc client",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\23 ds rpc server",3,"reg_dword"
wsobj.regwrite "hklm\system\currentcontrolset\services\ntds\diagnostics\24 ds schema",3,"reg_dword"
set wsobj = nothing 
wscript.echo "-=[complete!]=-"