{"id":205128,"date":"2013-12-09T17:06:03","date_gmt":"2013-12-09T13:06:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=205128"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=205128","title":{"rendered":"<span class=\"post_title\">\u041e\u0442\u0447\u0451\u0442 \u043f\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c \u043d\u0430 Windows \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0434\u043e\u043c\u0435\u043d\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0423\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432 \u043f\u043e\u0447\u0442\u0443 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u043e\u0442\u0447\u0451\u0442 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0434\u043e\u043c\u0435\u043d\u0430 \u0437\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0434\u0435\u043d\u044c. \u041c\u043e\u0436\u043d\u043e \u0438 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439, \u043d\u0435 \u0441\u0443\u0442\u044c \u0432\u0430\u0436\u043d\u043e. \u041a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u0438\u0435 \u043e\u0442\u0447\u0451\u0442\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0437\u0430 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440), \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438, \u043a\u0442\u043e \u0437\u0430\u0432\u0451\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b\/\u0443\u0434\u0430\u043b\u0438\u043b \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0430\u0440\u043e\u043b\u044c (\u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0441\u0430\u043c \u0441\u0435\u0431\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b), \u043b\u043e\u0433\u0438\u043d\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u043d\u044b \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0430\u043c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0434\u043b\u044f \u043e\u0442\u0447\u0451\u0442\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f. <br \/>  \u041d\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043f\u043e\u0447\u0442\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0447\u0451\u0442:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a54\/0a9\/404\/a540a94049fa7072ec56836ddbe04504.png\"\/><br \/>  \u041a\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e, \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u043e\u0435 \u0443\u0442\u0440\u043e \u0432 4 \u0447\u0430\u0441\u0430. \u0414\u043b\u044f \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043d\u0430\u0434\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=24659\">LogParser<\/a> \u0438 <a href=\"http:\/\/www.7-zip.org\/\">7-ZIP<\/a> (\u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0451\u0442\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 3 \u041c\u0411, \u0442\u043e \u043e\u043d \u043f\u0430\u043a\u0443\u0435\u0442\u0441\u044f zip\u2019\u043e\u043c). <br \/>  \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c 7-\u043a\u0438 \u0438 2008 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <a href=\"http:\/\/yadi.sk\/d\/q8eS1K_aE27UU\">Vista_2008_Security_Event_Descriptions.xlsx<\/a>.<br \/>  \u0423 \u043c\u0435\u043d\u044f \u0441\u043a\u0440\u0438\u043f\u0442 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 C \u0432 \u043f\u0430\u043f\u043a\u0435 script. \u0412 \u043f\u0430\u043f\u043a\u0435 script \u043f\u0430\u043f\u043a\u0430 Tamplates \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. \u041f\u043b\u044e\u0441 \u043f\u0430\u043f\u043a\u0438 \u043d\u0430 F Logi_ForADReports \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 evt-\u0444\u0430\u0439\u043b\u043e\u0432 \u0438 Reports \u0434\u043b\u044f html-\u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0442\u0447\u0451\u0442\u043e\u0432. \u0412 \u043f\u0430\u043f\u043a\u0435 Reports \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0436\u0443\u0440\u043d\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Bat-\u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"dos\">net use Q: \\\\nas-srv\\BACKUP cscript \/\/nologo &quot;c:\\script\\LogParser_bat_4.vbs&quot; %1 %2 %3 net use Q: \/delete <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 LogParser_bat_4.vbs<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"vbscript\">' \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442 \u043f\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 ' \u0410\u0432\u0442\u043e\u0440 \u041b\u0443\u0436\u0438\u043d \u041a\u0438\u0440\u0438\u043b\u043b ' luzhin.kirill@yandex.ru  'On Error Resume Next  const gsReportFolder = &quot;F:\\Reports\\&quot; const gsFrom = &quot;admin1@domain.com&quot; const gsSubject = &quot;send report&quot; const gsHelpFile = &quot;c:\\script\\LogParser_bat.txt&quot; const gbDebugModeON = false  Dim oLogQuery Dim oMyInputFormat Dim oCSVOutputFormat  Dim strQuery Dim giErrorCode Dim gsFileNameLog Dim gsNormalDate Dim gsTo Dim gArrNumberOfFunctions gArrNumberOfFunctions = Array (&quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;)   gsTo = &quot;admin1@domain.com&quot; gsEMail = &quot;n&quot; ' \u042d\u0442\u043e \u0434\u043b\u044f \u043e\u0442\u0447\u0435\u0442\u0430 \u0437\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f (\u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439): ' gsNormalDate = fuNormalizeSystemDate(cStr(Date)) ' \u042d\u0442\u043e \u0434\u043b\u044f \u043e\u0442\u0447\u0435\u0442\u0430 \u0437\u0430 \u0432\u0447\u0435\u0440\u0430 (\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c): gsNormalDate = fuNormalizeSystemDate(cStr(DateAdd(&quot;d&quot;, -1, Date))) gsDate = gsNormalDate gsNumberOfFunctions = &quot;all&quot;   gsCheckDate = DateAdd(&quot;d&quot;, -1, Date) gsLogFilename = fuGetFilename(gsCheckDate)   Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;) gsFileNameLog = gsReportFolder & gsNormalDate & &quot;.log&quot; Set objTextFileWriteLog = objFSO.OpenTextFile(gsFileNameLog, 8, True)   ' \u043e\u0442\u0447\u0435\u0442 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 33 \u0447\u0430\u0441\u0430: fuWritedown &quot;* \u0414\u0430\u0442\u0430 \u043e\u0442\u0447\u0435\u0442\u0430: &quot; & Now, 4 gsPastDate = DateAdd(&quot;h&quot;, -33, Now)  fuWritedown &quot;* \u041e\u0442\u0447\u0435\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 &quot; & gsPastDate, 4 ' \u043e\u0442\u0447\u0435\u0442 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 2 \u0434\u043d\u044f: ' gsPastDate = DateAdd(&quot;d&quot;, -2, Date) \t if Wscript.Arguments.Count &gt;= 1 then \tif lCase(Wscript.Arguments(0)) = &quot;nothing&quot; then \t\tgArrNumberOfFunctions = Array (&quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;, &quot;0&quot;) \t\tgsNumberOfFunctions = &quot;nothing&quot; \telseif InStr(Wscript.Arguments(0), &quot;,&quot;) then \t\tgArrNumberOfFunctions = split(Wscript.Arguments(0), &quot;,&quot;) \t\tgsNumberOfFunctions = &quot;different&quot; \telseif fuNeedHelp(lCase(Wscript.Arguments(0))) then \t\tfuTypeTextfile(gsHelpFile) \t\tWScript.Quit 0 \t'else gArrNumberOfFunctions = Array (&quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;, &quot;1&quot;) \tend if \t \tif Wscript.Arguments.Count &gt;= 2 then \t\tif InStr(Wscript.Arguments(1), &quot;@&quot;) then \t\t\tgsEMail = &quot;y&quot; \t\t\tgsTo = Wscript.Arguments(1) \t\telse \t\t\tgsEMail = lCase(Wscript.Arguments(1)) \t\tend if \t\t \t\tif Wscript.Arguments.Count = 3 then \t\t\tgsDate = Wscript.Arguments(2) \t\tend if \tend if end if   fuWritedown &quot;* \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u0430: &quot; & gsFileNameLog, 2  gStartTime = fuStartTimer(&quot;&quot;)  if gsNumberOfFunctions &lt;&gt; &quot;nothing&quot; then \tgArrProcNamesList = Array (_ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 AccauntManage&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0430\u0443\u0434\u0438\u0442\u0430&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0430\u0443\u0434\u0438\u0442\u0430&quot;, _ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u043a RDP&quot;,_ \t\t&quot;\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u043b\u0435\u0436\u0435\u043d\u0438\u044f \u0437\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u043d\u0430\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0432 AD&quot;) \t\t \tgArrReportfilesList = Array (_ \t\tgsReportFolder & &quot;logged_Administrator_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;new_AD_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;logonFailuresStats_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;group_Manage_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;logonFailure_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;change_password_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;new_Comp_AD_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;audit_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;auditStat_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;logged_Rdp_&quot; & gsNormalDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;AD_objects_&quot; & gsNormalDate & &quot;.html&quot;) \t\t   \tfor gix = 0 to UBound(gArrNumberOfFunctions) \t\tgsFunctionName = gArrProcNamesList(gix) \t\tgsReportfile = gArrReportfilesList(gix) \t\t \t\tif gArrNumberOfFunctions(gix) = &quot;1&quot; then\t \t\t\tstartTime = fuStartTimer(gsFunctionName) \t\t\tgArrServerList = Array (&quot;DC1&quot;, &quot;DC2&quot;) \t\t\tSelect Case gix \t\t\t\tCase 0: giErrorCode = fuLogonAdministrator(gArrServerList, gsReportfile) \t\t\t\tCase 1: giErrorCode = fuAccauntManage(gArrServerList, gsReportfile) \t\t\t\tCase 2: giErrorCode = fuLogonFailureStats(gArrServerList, gsReportfile) \t\t\t\tCase 3: gArrServerList = Array (&quot;DC1&quot;,&quot;DC2&quot;,&quot;EXCH1&quot;,&quot;EXCH2&quot;) \t\t\t\t\t\tgiErrorCode = fuGroupManage(gArrServerList, gsReportfile) \t\t\t\tCase 4: giErrorCode = fuLogonFailures(gArrServerList, gsReportfile) \t\t\t\tCase 5: giErrorCode = fuPasswordManage(gArrServerList, gsReportfile) \t\t\t\tCase 6: giErrorCode = fuCompManage(gArrServerList, gsReportfile) \t\t\t\tCase 7: gArrServerList = Array (&quot;FILE-SRV1&quot;,&quot;FILE-SRV2&quot;) \t\t\t\t\t\tgiErrorCode = fuAudit(gArrServerList, gsReportfile) \t\t\t\tCase 8: gArrServerList = Array (&quot;FILE-SRV1&quot;,&quot;FILE-SRV2&quot;) \t\t\t\t\t\tgiErrorCode = fuAuditStat(gArrServerList, gsReportfile) \t\t\t\tCase 9: gArrServerList = Array (&quot;DC1&quot;,&quot;DC2&quot;,&quot;EXCH1&quot;,&quot;EXCH2&quot;) \t\t\t\t\t\tgiErrorCode = fuLogonRdp(gArrServerList, gsReportfile, gsFunctionName) \t\t\t\tCase 10: giErrorCode = fuADObjects(gArrServerList, gsReportfile) \t\t\t\tCase else fuWritedown &quot;* \u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441: &quot; & gix, 4 \t\t\tEnd Select \t\t\tfuCheckErrorCode giErrorCode, gArrServerList, gsReportfile, gsFunctionName, startTime \t\telse \t\t\tfuWritedown gsFunctionName & &quot; \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u0430&quot;, 4 \t\tend if \tnext else \tfuWritedown &quot;* \u0412\u044b\u0431\u0440\u0430\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u043e\u0432&quot;, 4 end if  fuStopTimer(gStartTime)  if gsEMail = &quot;y&quot; then \tfuSendReportMail gsReportFolder & &quot;*_&quot; & gsDate & &quot;.*&quot;, gsFrom, gsTo, gsSubject, gsDate else \tfuWritedown &quot;* \u0412\u044b\u0431\u0440\u0430\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u0435\u0437 \u043e\u0442\u0441\u044b\u043b\u0430\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u043e\u0432&quot;, 4 end if  fuWritedown &quot;* \u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u0432 \u0424\u0430\u0439\u043b '&quot; & gsFileNameLog & &quot;'&quot;, 1 fuDeleteEvtxFiles &quot;F:\\Logi_ForADReports\\*.evtx&quot; 'MsgBox &quot;\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u0432 \u0424\u0430\u0439\u043b '&quot; & gsFileNameLog & &quot;'&quot;, vbInformation, &quot;\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f&quot; objTextFileWriteLog.Close  ' \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 function fuLogonAdministrator(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\t' Create Input Format object \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\t' Create Output Format object \t\t' Set oCSVOutputFormat = CreateObject(&quot;MSUtil.LogQuery.CSVOutputFormat&quot;) \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\t'oCSVOutputFormat.tabs = TRUE \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\logonAdministrator.tpl&quot;  \t\t' \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \t\tstrQuery = &quot;SELECT TO_LOWERCASE(EXTRACT_TOKEN(Strings,5,'|')) as UserName, eventid, TimeGenerated, ComputerName as DC, &quot; & _ \t\t\t&quot;TO_LOWERCASE(EXTRACT_TOKEN(Strings,5,'|')) AS LogonName, &quot; & _ \t\t\t&quot;TO_LOWERCASE(EXTRACT_TOKEN(Strings,6,'|')) AS Domain, &quot; & _ \t\t\t&quot;TO_LOWERCASE(EXTRACT_TOKEN(Strings,13,'|')) AS LogonWKS, &quot; & _ \t\t\t&quot;extract_token(trim(extract_token(Message, 18, ':' )), 0, ' ') as LogonIP, &quot; & _ \t\t\t&quot;CASE TO_INT(EXTRACT_TOKEN(Strings,10,'|')) &quot; & _ \t\t\t&quot;\tWHEN 2 THEN  'Interactive - Intended for users who will be interactively using the machine, such as a user being logged on by a terminal server, remote shell, or similar process.'&quot; & _ \t\t\t&quot;\tWHEN 3 THEN  'Network - Intended for high performance servers to authenticate clear text passwords. LogonUser does not cache credentials for this logon type.'&quot; & _ \t\t\t&quot;\tWHEN 4 THEN  'Batch - Intended for batch servers, where processes may be executing on behalf of a user without their direct intervention; or for higher performance servers that process many clear-text authentication attempts at a time, such as mail or web servers. LogonUser does not cache credentials for this logon type.'&quot; & _ \t\t\t&quot;\tWHEN 5 THEN  'Service - Indicates a service-type logon. The account provided must have the service privilege enabled.'&quot; & _ \t\t\t&quot;\tWHEN 6 THEN  'Proxy - Indicates a proxy-type logon.'&quot; & _ \t\t\t&quot;\tWHEN 7 THEN  'Unlock - This logon type is intended for GINA DLLs logging on users who will be interactively using the machine. This logon type allows a unique audit record to be generated that shows when the workstation was unlocked.'&quot; & _ \t\t\t&quot;\tWHEN 8 THEN  'NetworkCleartext - Windows 2000; Windows XP and Windows Server 2003 family:  Preserves the name and password in the authentication packages, allowing the server to make connections to other network servers while impersonating the client. This allows a server to accept clear text credentials from a client, call LogonUser, verify that the user can access the system across the network, and still communicate with other servers.'&quot; & _ \t\t\t&quot;\tWHEN 9 THEN  'NewCredentials - Windows 2000; Windows XP and Windows Server 2003 family:  Allows the caller to clone its current token and specify new credentials for outbound connections. The new logon session has the same local identity, but uses different credentials for other network connections.'&quot; & _ \t\t\t&quot;\tWHEN 10 THEN 'RemoteInteractive - Terminal Server session that is both remote and interactive.'&quot; & _ \t\t\t&quot;\tWHEN 11 THEN 'CachedInteractive - Attempt cached credentials without accessing the network.'&quot; & _ \t\t\t&quot;\tWHEN 12 THEN 'CachedRemoteInteractive - Same as RemoteInteractive. This is used for internal auditing.'&quot; & _ \t\t\t&quot;\tWHEN 13 THEN 'CachedUnlock - Workstation logon'&quot; & _ \t\t\t&quot;\tELSE EXTRACT_TOKEN(Strings,10,'|') &quot; & _ \t\t\t&quot;END AS LogonType, &quot; & _ \t\t\t&quot;extract_token(strings, 4, '|' ) as LogonProc, &quot; & _ \t\t\t&quot;extract_token(strings, 11, '|' ) as ProcessID &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID IN (4624;4636) &quot; & _ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t&quot;AND ((TO_LOWERCASE(LogonName) = TO_LOWERCASE('administrator')) &quot; & _ \t\t\t&quot; OR  (TO_LOWERCASE(LogonName) = TO_LOWERCASE('\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440')) &quot; & _ \t\t\t&quot; OR  (TO_LOWERCASE(LogonName) = TO_LOWERCASE('admin'))) &quot; \t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432: '&quot; & strQuery & &quot;'&quot;, 4  \t\t' Execute query \t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if  \tfuLogonAdministrator = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 AccauntManage function fuAccauntManage(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false) \t'lsFROM = &quot;\\\\DC1\\c$\\WINDOWS\\system32\\winevt\\Logs\\Archive-Security-2010-08-03-09-34-11-527.evtx&quot; \t'lsFROM = &quot;\\\\DC1\\security&quot;  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\accauntManage.tpl&quot; \t\t\t \t\tstrQuery = &quot;select extract_token(extract_token(Message, 3, ':' ), 0, ' Account ') as UserName, TimeGenerated, SourceName, Message as EventCategoryName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 0, ':' ),0,'.') as Description, EventID, ComputerName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 8, ':' ), 1, ' ') as Name &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID IN (4720;4722;4725;4726;4738;4740;4767;4780;4781;4782) &quot; &_ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss')&quot;  \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 AccauntManage: '&quot; & strQuery & &quot;'&quot;, 4 \t\t \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if  \tfuAccauntManage = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 function fuLogonFailureStats(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\logonFailuresStats.tpl&quot;  \t\tstrQuery = &quot;SELECT TO_LOWERCASE(EXTRACT_TOKEN(Strings,5,'|')) AS User, &quot; & _ \t\t&quot;COUNT(*) AS Total &quot; & _ \t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t&quot;WHERE EventID IN (4625) &quot; & _ \t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t&quot;GROUP BY User &quot; & _ \t\t&quot;ORDER BY Total DESC&quot; \t\t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if \t \tfuLogonFailureStats = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 function fuGroupManage(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\groupManage.tpl&quot;  \t\tstrQuery = &quot;SELECT extract_token(extract_token(Message, 3, ':' ), 0, ' Account ') as UserName, TimeGenerated, SourceName, EventCategoryName, &quot; & _  \t\t\t&quot;extract_token(extract_token(Message, 0, ':' ), 0, '.') as EventIDName, &quot; & _ \t\t\t&quot;COALESCE(extract_token(extract_token(strings, 0, ',' ), 1, '='), extract_token(strings, 0, '|' ), strings) as Name, &quot; & _ \t\t\t&quot;COALESCE(extract_token(extract_token(strings, 0, ',' ), 1, '='), extract_token(strings, 1, '|' ), strings) as SIDName, &quot; & _ \t\t\t&quot;extract_token(strings, 2, '|' ) as Name_Group, &quot; & _ \t\t\t&quot;EventID, extract_token(ComputerName, 0, '.') &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID IN (4727;4728;4729;4730;4731;4732;4733;4734;4735;4737;4744;4745;4746;4747;4748;4749;4750;4751;4752;4753;4754;4755;4756;4757;4758;4759;4760;4761;4762;4764;4783;4784;4785;4786;4787;4788;4789;4790) &quot; & _ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss')&quot; \t\t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if \t \tfuGroupManage = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 function fuLogonFailures(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\logonFailures.tpl&quot;  \t\tstrQuery = &quot;SELECT COUNT(EventID) AS TotalLogonFailures, &quot; & _ \t\t\t&quot;TO_LOWERCASE(EXTRACT_TOKEN(Strings,5,'|')) AS User, &quot; & _ \t\t\t&quot;TO_LOWERCASE(EXTRACT_TOKEN(Strings,6,'|')) AS Domain, &quot; & _ \t\t\t&quot;TO_LOWERCASE(EXTRACT_TOKEN(Strings,13,'|')) AS WorkStation, &quot; & _ \t\t\t&quot;CASE TO_INT(EXTRACT_TOKEN(Strings,10,'|')) &quot; & _ \t\t\t&quot;\tWHEN 2 THEN  'Interactive - Intended for users who will be interactively using the machine, such as a user being logged on by a terminal server, remote shell, or similar process.'&quot; & _ \t\t\t&quot;\tWHEN 3 THEN  'Network - Intended for high performance servers to authenticate clear text passwords. LogonUser does not cache credentials for this logon type.'&quot; & _ \t\t\t&quot;\tWHEN 4 THEN  'Batch - Intended for batch servers, where processes may be executing on behalf of a user without their direct intervention; or for higher performance servers that process many clear-text authentication attempts at a time, such as mail or web servers. LogonUser does not cache credentials for this logon type.'&quot; & _ \t\t\t&quot;\tWHEN 5 THEN  'Service - Indicates a service-type logon. The account provided must have the service privilege enabled.'&quot; & _ \t\t\t&quot;\tWHEN 6 THEN  'Proxy - Indicates a proxy-type logon.'&quot; & _ \t\t\t&quot;\tWHEN 7 THEN  'Unlock - This logon type is intended for GINA DLLs logging on users who will be interactively using the machine. This logon type allows a unique audit record to be generated that shows when the workstation was unlocked.'&quot; & _ \t\t\t&quot;\tWHEN 8 THEN  'NetworkCleartext - Windows 2000; Windows XP and Windows Server 2003 family:  Preserves the name and password in the authentication packages, allowing the server to make connections to other network servers while impersonating the client. This allows a server to accept clear text credentials from a client, call LogonUser, verify that the user can access the system across the network, and still communicate with other servers.'&quot; & _ \t\t\t&quot;\tWHEN 9 THEN  'NewCredentials - Windows 2000; Windows XP and Windows Server 2003 family:  Allows the caller to clone its current token and specify new credentials for outbound connections. The new logon session has the same local identity, but uses different credentials for other network connections.'&quot; & _ \t\t\t&quot;\tWHEN 10 THEN 'RemoteInteractive - Terminal Server session that is both remote and interactive.'&quot; & _ \t\t\t&quot;\tWHEN 11 THEN 'CachedInteractive - Attempt cached credentials without accessing the network.'&quot; & _ \t\t\t&quot;\tWHEN 12 THEN 'CachedRemoteInteractive - Same as RemoteInteractive. This is used for internal auditing.'&quot; & _ \t\t\t&quot;\tWHEN 13 THEN 'CachedUnlock - Workstation logon'&quot; & _ \t\t\t&quot;\tELSE EXTRACT_TOKEN(Strings,10,'|') &quot; & _ \t\t\t&quot;END AS Type &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID IN (4625) &quot; & _ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t&quot;GROUP BY User,Domain,WorkStation,Type &quot; & _ \t\t\t&quot;ORDER BY TotalLogonFailures DESC&quot; \t\t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if \t \tfuLogonFailures = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438 function fuPasswordManage(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\PasswordManage.tpl&quot; \t\t \t\tstrQuery = &quot;SELECT extract_token(extract_token(Message, 3, ':' ), 0, ' Account ') as UserName, TimeGenerated, SourceName, EventCategoryName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 0, ':' ),0,'.') as Description, EventID, ComputerName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 8, ':' ), 0, ' Account ') as Name &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID IN (4723;4724;4782;4793) &quot; & _ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss')&quot; \t\t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if \t \tfuPasswordManage = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438 function fuCompManage(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\compManage.tpl&quot; \t\t \t\tstrQuery = &quot;SELECT extract_token(extract_token(Message, 3, ':' ), 0, ' Account ') as UserName, TimeGenerated, SourceName, EventCategoryName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 0, ':' ),0,'.') as Description, EventID, ComputerName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 8, ':' ), 0, ' Account ') as Name &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID in (4720;4742;4743) &quot; & _ \t\t\t&quot;and Name like '%%$%%' &quot; & _ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss')&quot; \t\t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if \t \tfuCompManage = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 function fuAudit(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\audit.tpl&quot;  \t\tstrQuery = &quot;select TimeGenerated, EventID, &quot; & _ \t\t\t&quot;extract_token(Strings, 0, '|' ) as UserSID,  &quot; & _ \t\t\t&quot;extract_token(Strings, 6, '|' ) as ObjectName, &quot; & _ \t\t\t&quot;extract_token(Strings, 1, '|' ) as User, &quot; & _ \t\t\t&quot;extract_token(Strings, 2, '|' ) as Domain, &quot; & _ \t\t\t&quot;extract_token(Strings, 5, '|' ) as ObjectType, &quot; & _ \t\t\t&quot;extract_token(Strings, 11, '|' ) as ProgramName, &quot; & _ \t\t\t&quot;extract_token(Message, 0, '.' ) as Event &quot; & _ \t\t\t&quot;into &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;from &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;where EventId in (4656;4659;4660;4661;4663;4691) &quot; & _ \t\t\t&quot;and TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t&quot;and User &lt;&gt; 'NT AUTHORITY\\SYSTEM' &quot; & _ \t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%HarddiskVolumeShadowCopy%%' &quot; & _ \t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%ShadowCopyVolume%%' &quot; & _ \t\t\t&quot;and TO_LOWERCASE(extract_token(Strings, 6, '|' )) like '%%Top-Secret-Documents%%' &quot; & _ \t\t\t&quot;and User &lt;&gt; 'FILE-SRV1$' &quot; & _ \t\t\t&quot;and User &lt;&gt; 'FILE-SRV2$' &quot; & _ \t\t\t&quot;order by Timegenerated&quot; \t\t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 &quot; & lsFunctionName & &quot;: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tlsFROM = fuCollectFileList(lArrServerList, true) \t\t \t\tif lsFROM &lt;&gt; &quot;&quot; then \t\t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\t\toEVTInputFormat.direction = &quot;BW&quot;  \t\t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\audit.tpl&quot;  \t\t\tstrQuery = &quot;select TimeGenerated, EventID, &quot; & _ \t\t\t\t&quot;extract_token(Strings, 0, '|' ) as UserSID,  &quot; & _ \t\t\t\t&quot;extract_token(Strings, 6, '|' ) as ObjectName, &quot; & _ \t\t\t\t&quot;extract_token(Strings, 1, '|' ) as User, &quot; & _ \t\t\t\t&quot;extract_token(Strings, 2, '|' ) as Domain, &quot; & _ \t\t\t\t&quot;extract_token(Strings, 5, '|' ) as ObjectType, &quot; & _ \t\t\t\t&quot;extract_token(Strings, 11, '|' ) as ProgramName, &quot; & _ \t\t\t\t&quot;extract_token(Message, 0, '.' ) as Event &quot; & _ \t\t\t\t&quot;into &quot; & lsReport & &quot; &quot; & _ \t\t\t\t&quot;from &quot; & lsFROM & &quot; &quot; & _ \t\t\t\t&quot;where EventId in (4656;4659;4660;4661;4663;4691) &quot; & _ \t\t\t\t&quot;and TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t\t&quot;and User &lt;&gt; 'NT AUTHORITY\\SYSTEM' &quot; & _ \t\t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%HarddiskVolumeShadowCopy%%' &quot; & _ \t\t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%ShadowCopyVolume%%' &quot; & _ \t\t\t\t&quot;and TO_LOWERCASE(extract_token(Strings, 6, '|' )) like '%%Top-Secret-Documents%%' &quot; & _ \t\t\t\t&quot;and User &lt;&gt; 'FILE-SRV1$' &quot; & _ \t\t\t\t&quot;and User &lt;&gt; 'FILE-SRV2$' &quot; & _ \t\t\t\t&quot;order by Timegenerated&quot; \t\t\t\t \t\t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 &quot; & lsFunctionName & &quot;: '&quot; & strQuery & &quot;'&quot;, 4  \t\t\tif not gbDebugModeON then \t\t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\t\tend if \t\telse \t\t\tfuWritedown &quot;* \u0427\u0442\u043e-\u0442\u043e \u0441 \u0430\u0443\u0434\u0438\u0442\u043e\u043c \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043b\u043e\u0445\u043e.&quot;, 4 \t\tend if \t\t \t\tliErrorCode = 1 \tend if \t \tfuAudit = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0430\u0443\u0434\u0438\u0442\u0430 function fuAuditStat(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\auditStat.tpl&quot;  \t\tstrQuery = &quot;select extract_token(Strings, 1, '|' ) as User, &quot; & _ \t\t\t&quot;COUNT(*) as Qty, &quot; & _ \t\t\t&quot;MAX(TimeGenerated) as MaxTime  &quot; & _ \t\t\t&quot;into &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;from &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;where EventId in (4656;4659;4660;4661;4663;4691) &quot; & _ \t\t\t&quot;and TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t&quot;and User &lt;&gt; 'NT AUTHORITY\\SYSTEM' &quot; & _ \t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%HarddiskVolumeShadowCopy%%' &quot; & _ \t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%ShadowCopyVolume%%' &quot; & _ \t\t\t&quot;and TO_LOWERCASE(extract_token(Strings, 6, '|' )) like '%%Top-Secret-Documents%%' &quot; & _ \t\t\t&quot;group by User &quot; & _ \t\t\t&quot;order by User&quot; \t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 &quot; & lsFunctionName & &quot;: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tlsFROM = fuCollectFileList(lArrServerList, true) \t\t \t\tif lsFROM &lt;&gt; &quot;&quot; then \t\t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\t\toEVTInputFormat.direction = &quot;BW&quot;  \t\t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\auditStat.tpl&quot;  \t\t\tstrQuery = &quot;select extract_token(Strings, 1, '|' ) as User, &quot; & _ \t\t\t\t&quot;COUNT(*) as Qty, &quot; & _ \t\t\t\t&quot;MAX(TimeGenerated) as MaxTime  &quot; & _ \t\t\t\t&quot;into &quot; & lsReport & &quot; &quot; & _ \t\t\t\t&quot;from &quot; & lsFROM & &quot; &quot; & _ \t\t\t\t&quot;where EventId in (4656;4659;4660;4661;4663;4691) &quot; & _ \t\t\t\t&quot;and TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t\t&quot;and User &lt;&gt; 'NT AUTHORITY\\SYSTEM' &quot; & _ \t\t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%HarddiskVolumeShadowCopy%%' &quot; & _ \t\t\t\t&quot;and extract_token(Strings, 6, '|' ) not like '%%ShadowCopyVolume%%' &quot; & _ \t\t\t\t&quot;and TO_LOWERCASE(extract_token(Strings, 6, '|' )) like '%%Top-Secret-Documents%%' &quot; & _ \t\t\t\t&quot;group by User &quot; & _ \t\t\t\t&quot;order by User&quot; \t\t\t \t\t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 &quot; & lsFunctionName & &quot;: '&quot; & strQuery & &quot;'&quot;, 4  \t\t\tif not gbDebugModeON then \t\t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\t\tend if \t\telse \t\t\tfuWritedown &quot;* \u0427\u0442\u043e-\u0442\u043e \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u043c \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043b\u043e\u0445\u043e.&quot;, 4 \t\tend if \t \t\tliErrorCode = 1 \tend if \t \tfuAuditStat = liErrorCode end function  '\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u043a RDP function fuLogonRdp(lArrServerList, lsReport, lsFunctionName) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false)  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\logonRdp.tpl&quot;  \t\tstrQuery = &quot;SELECT DISTINCT resolve_sid(SID) as UserName, eventid, TimeGenerated, extract_token(ComputerName, 0, '.') as NormComputerName, &quot; & _ \t\t\t&quot;extract_token(strings, 5, '|' ) as LogonName, &quot; & _ \t\t\t&quot;extract_token(strings, 13, '|' ) as LogonWKS, &quot; & _ \t\t\t&quot;extract_token(strings, 18, '|' ) as LogonIP, &quot; & _ \t\t\t&quot;case extract_token(strings, 8, '|' ) &quot; & _ \t\t\t&quot; WHEN '2' THEN 'interactive' &quot; & _ \t\t\t&quot; WHEN '3' THEN 'network' &quot; & _ \t\t\t&quot; WHEN '4' THEN 'batch' &quot; & _ \t\t\t&quot; WHEN '5' THEN 'service' &quot; & _ \t\t\t&quot; WHEN '7' THEN 'unlocked workstation' &quot; & _ \t\t\t&quot; WHEN '8' THEN 'network logon using a cleartext password' &quot; & _ \t\t\t&quot; WHEN '9' THEN 'impersonated logons' &quot; & _ \t\t\t&quot; WHEN '10' THEN 'remote access' &quot; & _ \t\t\t&quot; ELSE extract_token(strings, 8, '|' ) &quot; & _ \t\t\t&quot;end as LogonType, &quot; & _ \t\t\t&quot;extract_token(strings, 17, '|' ) as LogonProc, &quot; & _ \t\t\t&quot;extract_token(strings, 16, '|' ) as ProcessID &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID IN (4624;4625;4648;4675) &quot; & _ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t&quot;AND LogonType = 'remote access' &quot; & _ \t\t\t&quot;order by Timegenerated DESC&quot; \t\t\t \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 &quot; & lsFunctionName & &quot;: '&quot; & strQuery & &quot;'&quot;, 4  \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if \t \tfuLogonRdp = liErrorCode end function  function fuADObjects(lArrServerList, lsReport) \tliErrorCode = -1 \tlsFROM = fuCollectFileList(lArrServerList, false) \t'lsFROM = &quot;\\\\DC1\\c$\\WINDOWS\\system32\\winevt\\Logs\\Archive-Security-2010-12-09-09-55-23-631.evtx&quot; \t'lsFROM = &quot;\\\\DC1\\security&quot;  \tif lsFROM &lt;&gt; &quot;&quot; then \t\tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)  \t\tSet oEVTInputFormat = CreateObject(&quot;MSUtil.LogQuery.EventLogInputFormat&quot;) \t\toEVTInputFormat.direction = &quot;BW&quot;  \t\tSet oTPLOutputFormat = CreateObject(&quot;MSUtil.LogQuery.TemplateOutputFormat&quot;) \t\toTPLOutputFormat.tpl = &quot;c:\\script\\Tamplates\\adobjects.tpl&quot; \t\t\t \t\tstrQuery = &quot;select extract_token(extract_token(Message, 3, ':' ), 0, ' Account ') as UserName, TimeGenerated, SourceName, Message as EventCategoryName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 0, ':' ),0,'.') as Description, EventID, ComputerName, &quot; & _ \t\t\t&quot;extract_token(extract_token(Message, 8, ':' ), 1, ' ') as Name &quot; & _ \t\t\t&quot;INTO &quot; & lsReport & &quot; &quot; & _ \t\t\t&quot;FROM &quot; & lsFROM & &quot; &quot; & _ \t\t\t&quot;WHERE EventID IN (4928;4929;4930;4931;4934;4935;4936;4937;4662;5136;5137;&quot; & _ \t\t\t&quot;5138;5139;5141;4932;4933) &quot; & _ \t\t\t&quot;AND TimeGenerated &gt;= TO_TIMESTAMP('&quot; & gsPastDate & &quot;','dd.MM.yyyy hh:mm:ss') &quot; & _ \t\t\t&quot;AND UserName not like '%%RTCService%%' &quot;  \t\tfuWritedown &quot;* \u0417\u0430\u043f\u0440\u043e\u0441 ADObjects: '&quot; & strQuery & &quot;'&quot;, 4 \t\t \t\tif not gbDebugModeON then \t\t\toLogQuery.ExecuteBatch strQuery, oEVTInputFormat, oTPLOutputFormat  \t\tend if \t\t \t\tliErrorCode = 0 \telse \t\tliErrorCode = 1 \tend if \t \tfuADObjects = liErrorCode end function   ' \u0421\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 function fuSendReportMail(lsFileMask, lsFrom, lsTo, lsSubject, lsDate) \tSet objEmail = CreateObject(&quot;CDO.Message&quot;) \tobjEmail.From = lsFrom \tobjEmail.To = lsTo \tobjEmail.Subject = lsSubject \tobjEmail.HTMLBody = &quot;&lt;span style='font-family:Tahoma,Arial,sans-serif;font-size:14pt;'&gt;\u041e\u0442\u0447\u0451\u0442\u044b \u0437\u0430 &quot; & _ \t\tlsDate & &quot;&lt;\/span&gt;&quot;  \tfuCheckfileSizeAndZIP lsDate \t \tSet oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;) \tSet oFormat = CreateObject(&quot;MSUtil.LogQuery.FileSystemInputFormat&quot;) \tSet oRecordSet = oLogQuery.Execute(&quot;SELECT * FROM &quot; & lsFileMask, oFormat)  \ti = 0 \tWhile Not oRecordSet.atEnd \t    Set oRecord = oRecordSet.getRecord() \t    strValue = oRecord.getValue(&quot;Path&quot;) \t    objEmail.AddAttachment strValue \t    i = i + 1 \t    oRecordSet.moveNext \tWend \toRecordSet.Close  \tobjEmail.Configuration.Fields.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/sendusing&quot;) = 2 \tobjEmail.Configuration.Fields.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/smtpserver&quot;)=&quot;MAIL-SRV&quot;  \tobjEmail.Configuration.Fields.Item(&quot;http:\/\/schemas.microsoft.com\/cdo\/configuration\/smtpserverport&quot;) = 25 \tobjEmail.Configuration.Fields.Update \tobjEmail.Send  \tfuWritedown &quot;* \u041e\u0442\u0447\u0435\u0442\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0442 '&quot; & lsFrom & &quot;' \u043d\u0430 '&quot; & lsTo & &quot;'. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0430\u0439\u043b\u043e\u0432-\u043e\u0442\u0447\u0435\u0442\u043e\u0432: &quot; & i, 4 end function  function fuCheckErrorCode(liErrorCode, lArrServerList, lsReportfile, lsFunctionName, startTime) \tselect case liErrorCode \t\tcase -1:  fuWritedown &quot;* &quot; & lsFunctionName & &quot; \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c (\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e)&quot;, 4 \t\tcase 0:   fuWritedown &quot;* &quot; & lsFunctionName & &quot; \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430&quot;, 4 \t\t\t\t  fuCheckResultFile(lsReportfile) \t\tcase 1:   fuWritedown &quot;* \u0414\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 '&quot; & Join(lArrServerList, &quot;,&quot;) & &quot;' \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0435 \u043f\u0430\u043f\u043a\u0438\/\u0444\u0430\u0439\u043b\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442 (\u0431\u043b\u043e\u043a FROM \u043f\u0443\u0441\u0442\u043e\u0439). \u041f\u043e\u0438\u0441\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u043c.&quot;, 4 \t\t\t\t  fuCheckResultFile(lsReportfile) \t\tcase else fuWritedown &quot;* \u041d\u0435\u043f\u0440\u0438\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 &quot; & lsFunctionName & &quot;!&quot;, 4 \tend select \t \tfuStopTimer(startTime) \tfuWritedown &quot;&quot;, 4 end function  function fuPing(NetworkDevice) \tlBoo = false \tset objPING = GetObject(&quot;winmgmts:{impersonationLevel=impersonate}&quot;)._ \t\tExecQuery (&quot;select * from Win32_PingStatus where address ='&quot; & NetworkDevice & &quot;'&quot;)  \tFor Each PING In objPing \t\tif PING.StatusCode = 0 then \t\t\tlBoo = true \t\tend if \tnext \t \tfuPing = lBoo end function  function fuCollectFileList(lArrServerList, lbFindOnServer) \t' true \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u0445, false \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u0445: \t' lbFindOnServer = true \t' lbFindOnServer = false \t \tlsTmp = Join(lArrServerList, &quot;,&quot;) \tfuWritedown &quot;* \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432: &quot; & lsTmp, 4 \tlsList = &quot;&quot; \tlsListFiles = &quot;&quot; \tlsTmpPath = &quot;&quot; \tlbServerHaveArchive = false  \tfor lix = 0 to UBound(lArrServerList) \t\tlsServer = lArrServerList(lix) \t\tfuWritedown &quot;* \u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 '&quot; & lsServer & &quot;'&quot;, 4 \t\t \t\tif lbFindOnServer then\t\t \t\t\tif fuPing(lsServer) then \t\t\t\tfuWritedown &quot;* \u0415\u0441\u0442\u044c \u0432 \u0441\u0435\u0442\u0438&quot;, 4 \t\t\t\tlsList = lsList & &quot;\\\\&quot; & lsServer & &quot;\\Security&quot; \t\t\t\t \t\t\t\t\tif fuServerHaveArchive(lsServer, lsListFiles) then \t\t\t\t\t\tlbServerHaveArchive = true \t\t\t\t\t\t'lsList = lsList & &quot;,&quot; & &quot;\\\\&quot; & lsServer & &quot;\\c$\\WINDOWS\\system32\\config\\archive-security-*.evtx&quot; \t\t\t\t\t\tif len(lsListFiles) &lt;&gt; 0 then \t\t\t\t\t\t\t'lsList = lsList & &quot;,&quot; & lsListFiles \t\t\t\t\t\tend if \t\t\t\t\tend if \t\t\t\t \t\t\t\tif lix &lt; UBound(lArrServerList) then \t\t\t\t\tlsList = lsList & &quot;,&quot; \t\t\t\tend if \t\t\telse \t\t\t\tfuWritedown &quot;* \u041d\u0435\u0442 \u0432 \u0441\u0435\u0442\u0438&quot;, 4 \t\t\tend if \t\telse \t\t\tlbServerHaveArchive = false \t\t\t \t\t\tif Len(lsListFiles) = 0 then \t\t\t\tlsListFiles = fuGetLogFolder(lsServer) \t\t\telse \t\t\t\tlsTmpPath = fuGetLogFolder(lsServer) \t\t\t\tif Len(lsTmpPath) &lt;&gt; 0 then \t\t\t\t\tlsListFiles = lsListFiles & &quot;,&quot; & lsTmpPath \t\t\t\tend if \t\t\tend if \t\tend if \t\t \tnext  \tif Right(lsList, 2) = &quot;, &quot; then \t\tlsList = Left(lsList, Len(lsList)-2) \tend if \t \t'\\\\dc1\\Security, \\\\dc1\\c$\\WINDOWS\\system32\\config\\Archive-Security-*.evt,  \t'\\\\dc2\\Security, \\\\dc2\\c$\\WINDOWS\\system32\\config\\Archive-Security-*.evt \t \tif lbServerHaveArchive then \t\tlsList = lsList & &quot;,&quot; & lsListFiles \tend if \t \tif not lbFindOnServer then \t\tlsList = lsListFiles \tend if \t \tfuWritedown &quot;* \u0411\u043b\u043e\u043a FROM \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: '&quot; & lsList & &quot;'&quot;, 4 \tfuCollectFileList = lsList end function  function fuServerHaveArchive(lsServerName, lsListFiles_a) \tConst FILE_NAME = 0  \tdim gbFoo \tdim gsFilename  \tgbFoo = false  \tSet objShell = CreateObject (&quot;Shell.Application&quot;) \tSet objFolder = objShell.Namespace (&quot;\\\\&quot; & lsServerName & &quot;\\c$\\Windows\\System32\\winevt\\Logs&quot;)  \tFor Each strFileName in objFolder.Items \t\tgsFilename = trim(lCase(objFolder.GetDetailsOf (strFileName, FILE_NAME))) \t\t' fuWritedown &quot;* gsFilename: &quot; & gsFilename, 1 \t    if ((InStr(gsFilename, &quot;archive-security-&quot;)) and (Right(gsFilename, 4) = &quot;evtx&quot;)) then \t\t\tfuWritedown &quot;* \u0410\u0440\u0445\u0438\u0432 \u043d\u0430\u0439\u0434\u0435\u043d! \\\\&quot; & lsServerName & &quot;\\c$\\Windows\\System32\\winevt\\Logs\\&quot;&gsFilename, 4 \t\t\tif len(lsListFiles_a) = 0 then \t\t\t\tlsListFiles_a = &quot;f:\\Logi_ForADReports\\&quot; & gsFilename \t\t\telse  \t\t\t\tlsListFiles_a = lsListFiles_a & &quot;,&quot; & &quot;f:\\Logi_ForADReports\\&quot; & gsFilename \t\t\tend if \t\t\tfuWritedown &quot;* lsListFiles_a: &quot; & lsListFiles_a, 2 \t\t\t'fuConvertEvt2Evtx &quot;\\\\&quot; & lsServerName & &quot;\\c$\\WINDOWS\\system32\\config\\&quot; & gsFilename, gsFilename \t\t\tfuCopyEvtx &quot;\\\\&quot; & lsServerName & &quot;\\c$\\Windows\\System32\\winevt\\Logs\\&quot; & gsFilename, gsFilename \t\t\tgbFoo = true \t\tend if \tNext  \tif gbFoo then \t\tfuWritedown &quot;* \u041d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 '&quot; & lsServerName & &quot;' \u0430\u0440\u0445\u0438\u0432\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 \u0435\u0441\u0442\u044c&quot;, 4 \telse \t\tfuWritedown &quot;* \u041d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 '&quot; & lsServerName & &quot;' \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 \u043d\u0435\u0442&quot;, 4 \tend if  \t \tfuServerHaveArchive = gbFoo end function  function fuConvertEvt2Evtx(lsFilenamePath, lsFilename) \tlbTmp = true \t \tif (fuIsFileExists(&quot;f:\\Logi_ForADReports\\&quot; & lsFilename) and (fuIsFileExists(&quot;f:\\Logi_ForADReports\\&quot; & lsFilename & &quot;x&quot;))) then \t\tfuWritedown &quot;* \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u0430 &quot; & lsFilename & &quot; \u043d\u0435 \u043d\u0443\u0436\u043d\u0430, \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439&quot;, 4 \telse \t\tfuWritedown &quot;* \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b &quot; & lsFilename & &quot;...&quot;, 4  \t\tSet WshShell = CreateObject(&quot;WScript.Shell&quot;)  \t\tgsRunCmd = &quot;c:\\script\\convert_evt_to_evtx.bat &quot; & lsFilenamePath & &quot; &quot; & lsFilename  \t\tfuWritedown &quot;* \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430: '&quot; & gsRunCmd & &quot;'&quot;, 2 \t\tWshShell.Run gsRunCmd \t\t \t\tWScript.Sleep 300000 \tend if \t \tfuConvertEvt2Evtx = lbTmp end function   function fuCopyEvtx(lsFilenamePath, lsFilename) \tlbTmp = true  \tif not fuIsFileExists(&quot;f:\\Logi_ForADReports\\&quot; & lsFilename) then \t\tSet WshShell = CreateObject(&quot;WScript.Shell&quot;) \t\t \t\tgsRunCmd = &quot;c:\\script\\copy_evtx.bat &quot; & lsFilenamePath & &quot; &quot; & lsFilename \t\tfuWritedown &quot;* \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430: '&quot; & gsRunCmd & &quot;'&quot;, 4 \t\tWshShell.Run gsRunCmd \t\t\t \t\tWScript.Sleep 25000 \telse \t\tfuWritedown &quot;* \u0410\u0440\u0445\u0438\u0432\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b &quot; & lsFilename & &quot; \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439&quot;, 4 \tend if \t \tfuCopyEvtx = lbTmp end function   function fuDeleteEvtxFiles(lsFromList) \tfuWritedown &quot;* \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432: &quot; & lsFromList, 4 \tlbTmp = true \t \tSet WshShell = CreateObject(&quot;WScript.Shell&quot;) \t \tif InStr(lsFromList, &quot;,&quot;) then \t\tlArrFrom = Split(lsFromList, &quot;,&quot;) \t\t \t\tfor lix = 0 to uBound(lArrFrom) \t\t\tif InStr(lCase(lArrFrom(lix)), &quot;archive-security-&quot;) then \t\t\t\tgsRunCmd = &quot;c:\\script\\del_evtx.bat &quot; & lArrFrom(lix)  \t\t\t\tfuWritedown &quot;* \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430: '&quot; & gsRunCmd & &quot;'&quot;, 4 \t\t\t\tWshShell.Run gsRunCmd \t\t\tend if \t\tnext \telse \t\tgsRunCmd = &quot;c:\\script\\del_evtx.bat &quot; & lsFromList  \t\tfuWritedown &quot;* \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430: '&quot; & gsRunCmd & &quot;'&quot;, 4 \t\tWshShell.Run gsRunCmd \tend if \t \tWScript.Sleep 60000 \t \tfuDeleteEvtxFiles = lbTmp end function    function fuIsFileExists(lsFilename) \tlBoo = false \t \tSet FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;) \tif FSO.FileExists(lsFilename) then \t\t' \u0424\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \t\tlBoo = true \telse  \t\t' \u0424\u0430\u0439\u043b\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \tend if \tSet FSO = nothing \t \tfuIsFileExists = lBoo end function  function fuWritedown(lsToWrite, liCase) \tSelect Case liCase \t\tCase 0: ' \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u0438\u043a\u0443\u0434\u0430. \t\tCase 1: WScript.Echo lsToWrite ' \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \t\tCase 2: objTextFileWriteLog.WriteLine lsToWrite ' \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \t\tCase 4: WScript.Echo lsToWrite ' \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0438 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \t\t\t\tobjTextFileWriteLog.WriteLine lsToWrite \t\tCase else WScript.Echo lsToWrite \tEnd Select end function   function fuNormalizeSystemDate(lsDate) \tlsNormalizeDate = lsDate \t \tif InStr(lsDate, &quot;.&quot;) then \t\tlArrDate = Split(lsDate, &quot;.&quot;) \t\tlsNormalizeDate = lArrDate(2) & &quot;.&quot; & lArrDate(1) & &quot;.&quot; & lArrDate(0) \telseif InStr(lsDate, &quot;\/&quot;) then \t\tlArrDate = Split(lsDate, &quot;\/&quot;) \t\tlsNormalizeDate = fuCheckDatePart(lArrDate(2)) & &quot;.&quot; & fuCheckDatePart(lArrDate(0)) & &quot;.&quot; & fuCheckDatePart(lArrDate(1)) \tend if \t \tfuNormalizeSystemDate = lsNormalizeDate end function   function fuNormalizeDate(lsDate) \tlsNormalizeDate = lsDate \t \tif InStr(lsDate, &quot;.&quot;) then \t\tlArrDate = Split(lsDate, &quot;.&quot;) \t\tlsNormalizeDate = lArrDate(2) & &quot;.&quot; & lArrDate(1) & &quot;.&quot; & lArrDate(0) \tend if \t \tfuNormalizeDate = lsNormalizeDate end function   function fuCheckDatePart(lsDate) \tlsNormalizeDate = lsDate \t \tif len(lsDate) &lt;= 1 then \t\tlsNormalizeDate = &quot;0&quot; & lsDate \tend if \t \tfuCheckDatePart = lsNormalizeDate end function   function fuStartTimer(lsFunctionName) \tfuStartTimer = Now() \tif lsFunctionName &lt;&gt; &quot;&quot; then \t\tfuWritedown VBNewLine & lsFunctionName & &quot; \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430&quot;, 4 \tend if end function   function fuStopTimer(startTime) \tEndTime = Now() \ttimeDiff = CDate(EndTime - startTime) \tfuWritedown &quot;* \u041f\u043e\u0438\u0441\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f: &quot; & timeDiff & &quot; (&quot; & startTime & &quot;\/&quot; & EndTime & &quot;).&quot;, 4 end function   function fuCheckResultFile(lsReportfile) \tif objFSO.FileExists(lsReportfile) then \t\tfuWritedown &quot;* \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u0432 \u0444\u0430\u0439\u043b '&quot; & lsReportfile & &quot;'&quot;, 4 \telse  \t\tfuWritedown &quot;* \u0424\u0430\u0439\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 '&quot; & lsReportfile & &quot;' \u043d\u0435 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0438\u0441\u043a \u043d\u0435 \u0434\u0430\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432&quot;, 4 \tend if end function   function fuTypeTextfile(lsTextfile) \t'fuWritedown &quot;\u0420\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u043e\u043c\u043e\u0449\u0438 '&quot; & lsTextfile & &quot;'&quot;, 1 \tSet objTextFileShowHelp = objFSO.OpenTextFile(lsTextfile, 1) \tDo Until objTextFileShowHelp.AtEndOfStream \t\tfuWritedown objTextFileShowHelp.Readline, 1 \tLoop \tobjTextFileShowHelp.Close end function   function fuNeedHelp(lsPar) \tlbFoo = false \tif  lsPar = &quot;h&quot; or lsPar = &quot;help&quot; or InStr(lsPar, &quot;?&quot;) then \t\tlbFoo = true \tend if \tfuNeedHelp = lbFoo end function    function fuGetFilename(lsDate) \tlsTmp = &quot;Archive-Security-2013-12-01-*.evtx&quot; \t \tif InStr(lsDate, &quot;.&quot;) then \t\tlArrDate = Split(lsDate, &quot;.&quot;) \t\tlsTmp = &quot;Archive-Security-&quot; & fuCheckDatePart(lArrDate(2)) & &quot;-&quot; & fuCheckDatePart(lArrDate(1)) & &quot;-&quot; & fuCheckDatePart(lArrDate(0)) & &quot;-*.evtx&quot; \telseif InStr(lsDate, &quot;\/&quot;) then \t\tlArrDate = Split(lsDate, &quot;\/&quot;) \t\tlsTmp = &quot;Archive-Security-&quot; & fuCheckDatePart(lArrDate(2)) & &quot;-&quot; & fuCheckDatePart(lArrDate(1)) & &quot;-&quot; & fuCheckDatePart(lArrDate(0)) & &quot;-*.evtx&quot; \tend if \t \tfuGetFilename = lsTmp end function   function fuGetLogFolder(lsServer) \tlsTmp = &quot;&quot; \t \tSelect Case lsServer \t\tCase &quot;DC1&quot;: lsTmp = &quot;Q:\\Logi_DC1\\&quot; \t\tCase &quot;DC2&quot;: lsTmp = &quot;Q:\\Logi_DC2\\&quot; \t\tCase &quot;FILE-SRV1&quot;: lsTmp = &quot;Q:\\Logi_FILE-SRV1\\&quot; \t\tCase &quot;FILE-SRV2&quot;: lsTmp = &quot;Q:\\Logi_FILE-SRV2\\&quot; \t\tCase &quot;EXCH1&quot;: lsTmp = &quot;Q:\\Logi_EXCH1\\&quot; \t\tCase &quot;EXCH2&quot;: lsTmp = &quot;Q:\\Logi_EXCH2\\&quot; \t\tCase else  \t\t\tfuWritedown &quot;* \u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043f\u0430\u043f\u043a\u0430 \u0441 \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 &quot; & lsServer & &quot; \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430. \u041f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u0430\u043f\u043a\u0443 \u0443\u0433\u0430\u0434\u0430\u0442\u044c 'Q:\\Logi_&quot; & lsServer & &quot;\\'&quot;, 4 \t\t\tlsTmp = &quot;Q:\\Logi_&quot; & lsServer & &quot;\\&quot; \tEnd Select \t \t \tlsPath = Left(lsTmp, Len(lsTmp)-1) \t'lsPath = lsTmp \tlsFile = gsLogFilename  \tlsBoo = fuNASHaveArchive(lsServer, lsPath, lsFile)  \tif lsBoo then \t\tlsTmp = lsTmp & gsLogFilename \telse \t\tlsTmp = &quot;&quot; \tend if \t \tfuGetLogFolder = lsTmp end function    function fuNASHaveArchive(Server, Path, File) \twscript.echo Server & &quot;, &quot; & Path & &quot;, &quot; & File  \tConst FILE_NAME = 0  \tdim gbFoo \tdim gsFilename  \tgbFoo = false \t \tlsF = lCase(Left(File, Len(File)-6))  \tSet objShell = CreateObject(&quot;Shell.Application&quot;) \tSet objFolder = objShell.Namespace(Path)  \tFor Each strFileName in objFolder.Items \t\tgsFilename = trim(lCase(objFolder.GetDetailsOf (strFileName, FILE_NAME))) \t\t' wscript.echo  &quot;* gsFilename: &quot; & gsFilename \t    if InStr(gsFilename, lsF) then \t\t\tgbFoo = true \t\tend if \tNext  \tfuNASHaveArchive = gbFoo end function   function fuCheckfileSizeAndZIP(lsDate) \tlsReportFolder = &quot;F:\\Reports\\&quot; \tlArrReportfilesList = Array (_ \t\tlsReportFolder & &quot;logged_Administrator_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;new_AD_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;logonFailuresStats_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;group_Manage_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;logonFailure_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;change_password_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;new_Comp_AD_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;audit_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;auditStat_&quot; & lsDate & &quot;.html&quot;, _ \t\tlsReportFolder & &quot;logged_Rdp_&quot; & lsDate & &quot;.html&quot;, _ \t\tgsReportFolder & &quot;AD_objects_&quot; & gsNormalDate & &quot;.html&quot;)  \tfor lix = 0 to UBound(lArrReportfilesList) \t\tlbTmp = false \t\t \t\tlsFilenamePath = lArrReportfilesList(lix) \t\tArcName = Left(lsFilenamePath, Len(lsFilenamePath)-5) & &quot;.zip&quot; \t\t \t\tif fuIsFileExists(lsFilenamePath) then \t\t\tSet File = objFSO.GetFile(lsFilenamePath)  \t\t\t lsFilenameSize =  File.Size \t\t\t if lsFilenameSize &gt; 3000000 then \t\t\t\tfuWritedown &quot;* \u0420\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 '&quot; & lsFilenamePath & &quot;' \u0431\u043e\u043b\u044c\u0448\u0435 3 \u041c\u0411 (\u0440\u0430\u0437\u043c\u0435\u0440 &quot; & lsFilenameSize & &quot; \u0431\u0430\u0439\u0442), \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0435\u0433\u043e \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c&quot;, 4 \t\t\t\tfuWritedown &quot;* \u0418\u0434\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044f...&quot;, 1 \t\t\t\t'--[ \u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u0430 ]------------------------------------------------------------------- \t\t\t\tSet Shell=CreateObject(&quot;WScript.Shell&quot;) \t\t\t\tSet Zip=Shell.Exec(&quot;C:\\Program Files\\7-Zip\\7z.exe a &quot; & ArcName & &quot; &quot; & lsFilenamePath)  \t\t\t\t'\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435, \u043f\u043e\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \t\t\t\tWhile (Zip.Status = 0) \t\t\t\t\tWScript.Sleep 5000 \t\t\t\tWend  \t\t\t\tSet Shell = Nothing  \t\t\t\tfuWritedown &quot;* \u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e! \u0418\u043c\u044f \u0430\u0440\u0445\u0438\u0432\u0430 '&quot; & ArcName & &quot;'&quot;, 4 \t\t\t\tfuWritedown &quot;* \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0435\u0442\u0430 '&quot; & lsFilenamePath & &quot;'...&quot;, 4 \t\t\t\tobjFSO.DeleteFile lsFilenamePath, true \t\t\t\tfuWritedown &quot;* \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e!&quot;, 1 \t\t\t\tlbTmp = true \t\t\t\t'WScript.Sleep 2000 \t\t\t\t'--------------------------------------------------------------------------------------------- \t\t\t end if \t\telse  \t\t\t' \u0444\u0430\u0439\u043b\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c. \t\tend if \tnext \t \tfuCheckfileSizeAndZIP = lbTmp end function  <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0412\u0441\u043f\u043e\u043c\u0430\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0442\u043d\u0438\u043a\u0438.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">convert_evt_to_evtx.bat<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"dos\">copy %1 f:\\Logi_ForADReports\\%2 wevtutil epl f:\\Logi_ForADReports\\%2 f:\\Logi_ForADReports\\%2x \/lf:true <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">copy_evtx.bat<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"dos\">copy %1 f:\\Logi_ForADReports\\%2 <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">del_evtx.bat<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"dos\">del %1 <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043b\u044e\u0447\u0435\u0439. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442\u043e\u0432.<br \/>  \u0421\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0440\u0438 \u043a\u043b\u044e\u0447\u0430.  <\/p>\n<pre><code class=\"dos\">Logparser_4.bat [\u0441\u043f\u0438\u0441\u043e\u043a_\u043e\u0442\u0447\u0435\u0442\u043e\u0432] [\u0430\u0434\u0440\u0435\u0441_\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439_\u043f\u043e\u0447\u0442\u044b] [\u0434\u0430\u0442\u0430] <\/code><\/pre>\n<p>   [\u0441\u043f\u0438\u0441\u043e\u043a_\u043e\u0442\u0447\u0435\u0442\u043e\u0432] \u2014 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u041f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043e\u0442\u0447\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435: \u00ab1,1,0,0,1,0,1,0,1,0,0\u00bb, \u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0442\u0447\u0435\u0442 \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c.<br \/>   \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0442\u0447\u0435\u0442\u044b, \u0443\u043a\u0430\u0437\u0430\u0432 \u043a\u043b\u044e\u0447 all.<br \/>   \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043a\u043b\u044e\u0447 nothing.<\/p>\n<p>  [\u0430\u0434\u0440\u0435\u0441_\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439_\u043f\u043e\u0447\u0442\u044b] \u2014 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u041c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<br \/>   y \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0447\u0435\u0442\u044b \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (admin1@domain.com)<br \/>   n \u2014 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0447\u0435\u0442\u044b \u043d\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u044f\u0449\u0438\u043a, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 f:\\Reports.<br \/>   \u0430\u0434\u0440\u0435\u0441_\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439_\u043f\u043e\u0447\u0442\u044b \u2014 \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0441\u043b\u0430\u043d\u044b \u043e\u0442\u0447\u0435\u0442\u044b. <\/p>\n<p>  [\u0434\u0430\u0442\u0430] \u2014 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u0442\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0442\u0447\u0435\u0442\u0430\u043c\u0438. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0437\u0430 \u0434\u0430\u0442\u0443 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c (\u041e\u0442\u0447\u0435\u0442\u044b <i>\u0432\u0441\u0435\u0433\u0434\u0430<\/i> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0434\u0435\u043d\u044c \u043e\u0442 \u0434\u0430\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430). \u0424\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u0442\u044b: YYYY.MM.DD<\/p>\n<p>  \u041e\u0442\u0447\u0435\u0442\u044b:<br \/>  1. \u041e\u0442\u0447\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432<br \/>  2. \u041e\u0442\u0447\u0435\u0442 AccauntManage<br \/>  3. \u041e\u0442\u0447\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432<br \/>  4. \u041e\u0442\u0447\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438<br \/>  5. \u041e\u0442\u0447\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432<br \/>  6. \u041e\u0442\u0447\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438<br \/>  7. \u041e\u0442\u0447\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438<br \/>  8. \u041e\u0442\u0447\u0435\u0442 \u0430\u0443\u0434\u0438\u0442\u0430 \u043f\u043e \u043f\u0430\u043f\u043a\u0435 Top-Secret-Documents<br \/>  9. \u041e\u0442\u0447\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0430\u0443\u0434\u0438\u0442\u0430 \u043f\u043e \u043f\u0430\u043f\u043a\u0435 Top-Secret-Documents<br \/>  10. \u041e\u0442\u0447\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u043a RDP<br \/>  11. \u041e\u0442\u0447\u0435\u0442 \u0441\u043b\u0435\u0436\u0435\u043d\u0438\u044f \u0437\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u043d\u0430\u0434 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0432 AD<\/p>\n<p>  <i>\u041f\u0440\u0438\u043c\u0435\u0440\u044b.<\/i><\/p>\n<pre><code class=\"dos\">Logparser_4.bat nothing &quot;admin2@domain.com&quot; 2013.01.01 <\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0437\u0430 1 \u044f\u043d\u0432\u0430\u0440\u044f 2013 \u0433. \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u0430 \u00abadmin2@domain.com\u00bb (\u0437\u0430\u043d\u043e\u0432\u043e \u043e\u0442\u0447\u0435\u0442\u044b \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f).<\/p>\n<pre><code class=\"dos\">Logparser_4.bat nothing y 2013.02.18 <\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0437\u0430 18 \u0444\u0435\u0432\u0440\u0430\u043b\u044f 2013 \u0433. \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u0437\u0430\u043d\u043e\u0432\u043e \u043e\u0442\u0447\u0435\u0442\u044b \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f).<\/p>\n<pre><code class=\"dos\">Logparser_4.bat all &quot;admin3@domain.com&quot; <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0438 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u0430 \u00abadmin3@domain.com\u00bb.<\/p>\n<pre><code class=\"dos\">Logparser_4.bat &quot;1,0,0,0,0,0,0,0,0,1,0&quot; <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043e\u0442\u0447\u0451\u0442\u044b \u0438 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<pre><code class=\"dos\">Logparser_4.bat &quot;0,1,0,0,0,0,0,0,0,0,0&quot; n <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u0442\u0447\u0435\u0442, \u043d\u043e \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442, \u0430 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0435\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 f:\\Reports.<\/p>\n<pre><code class=\"dos\">Logparser_4.bat \/? <\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043c\u043e\u0449\u044c.<\/p>\n<p>  <i>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/i>.<br \/>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438\u0449\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 (\u0442\u0435, \u0447\u0442\u043e Archive-Security-*.evt) \u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u044d\u0442\u043e \u0434\u0438\u0441\u043a Q, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0432 \u0431\u0430\u0442\u043d\u0438\u043a\u0435  <\/p>\n<pre><code class=\"dos\">net use Q: \\\\nas-srv\\BACKUP<\/code><\/pre>\n<p>\u041d\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0445 11 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c   <\/p>\n<pre><code class=\"vbscript\">lsFROM = fuCollectFileList(lArrServerList, false)<\/code><\/pre>\n<p> \u043d\u0430 <\/p>\n<pre><code class=\"vbscript\">lsFROM = fuCollectFileList(lArrServerList, true)<\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e <a href=\"http:\/\/yadi.sk\/d\/hRR5WIFvE2r5e\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432 \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c, \u0431\u0430\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438<\/a>. <br \/>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f, \u043a\u0430\u043a \u043b\u043e\u0433\u043f\u0430\u0440\u0441\u0435\u0440 \u0438\u0449\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438\u0445 \u0432 html-\u0444\u0430\u0439\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0448\u0430\u0431\u043b\u043e\u043d. \u0418 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/205128\/\"> http:\/\/habrahabr.ru\/post\/205128\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0423\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432 \u043f\u043e\u0447\u0442\u0443 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u043e\u0442\u0447\u0451\u0442 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0434\u043e\u043c\u0435\u043d\u0430 \u0437\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0434\u0435\u043d\u044c. \u041c\u043e\u0436\u043d\u043e \u0438 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439, \u043d\u0435 \u0441\u0443\u0442\u044c \u0432\u0430\u0436\u043d\u043e. \u041a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u0438\u0435 \u043e\u0442\u0447\u0451\u0442\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0437\u0430 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440), \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438, \u043a\u0442\u043e \u0437\u0430\u0432\u0451\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b\/\u0443\u0434\u0430\u043b\u0438\u043b \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0430\u0440\u043e\u043b\u044c (\u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0441\u0430\u043c \u0441\u0435\u0431\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b), \u043b\u043e\u0433\u0438\u043d\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u043d\u044b \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0430\u043c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0434\u043b\u044f \u043e\u0442\u0447\u0451\u0442\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f. <br \/>  \u041d\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043f\u043e\u0447\u0442\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0447\u0451\u0442:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a54\/0a9\/404\/a540a94049fa7072ec56836ddbe04504.png\"\/><br \/>  \u041a\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e, \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-205128","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/205128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=205128"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/205128\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=205128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=205128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=205128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}