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

时间:2021-05-22

DimwsObj
SetwsObj=CreateObject("Wscript.Shell")

'AddtheLogLevelValuetoKerberosKeyinRegistry.
OnErrorResumeNext
WScript.Echo"EnablingKerberosLogging..."
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\1KnowledgeConsistencyChecker",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\2SecurityEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\3ExDSInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\4MAPIInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\5ReplicationEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\6GarbageCollection",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\7InternalConfiguration",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\8DirectoryAccess",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\9InternalProcessing",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\10PerformanceCounters",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\11Initialization/Termination",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\12ServiceControl",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\13NameResolution",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\14Backup",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\15FieldEngineering",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\16LDAPInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\17Setup",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\18GlobalCatalog",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\19Inter-siteMessaging",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\20GroupCaching",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\21Linked-ValueReplication",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\22DSRPCClient",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\23DSRPCServer",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\24DSSchema",3,"REG_DWORD"
SetwsObj=Nothing
WScript.Echo"-=[Complete!]=-"

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章