{"id":275929,"date":"2016-03-11T13:38:02","date_gmt":"2016-03-11T10:38:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=275929"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=275929","title":{"rendered":"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430 \u0432 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c VBScript"},"content":{"rendered":"<br \/>\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u0443\u0434\u0438\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c\u0443 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443, \u0434\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0436 \u0434\u043e\u043b\u0433\u043e, \u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e. \u0420\u0435\u0448\u0435\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u043a\u043e\u0441\u0442\u044b\u043b\u044c\u00bb \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430\u0445 \u0432 \u0434\u043e\u043c\u0435\u043d\u0435.<\/p>\n<p>  <i>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/i><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0427\u0442\u043e \u0436\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c?<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0431\u044b\u043b\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0447\u0442\u043e \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e:<\/p>\n<p>  1) \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430<br \/>  2) \u0410\u043a\u0442\u0438\u0432\u0435\u043d \u043b\u0438 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441<br \/>  3) \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043b\u0438 \u043d\u0430 \u043d\u0435\u043c \u0431\u0430\u0437\u044b<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u044b\u043b \u043d\u0430\u0439\u0434\u0435\u043d \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/aa394582%28v=vs.85%29.aspx\">WMI<\/a> (Windows Management Instrumentation).<\/p>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b WMI \u043d\u0430 \u041f\u041a, \u0432 \u044d\u0442\u043e\u043c \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=24045\">WMI Tools<\/a>.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 WMI, \u043d\u0435 \u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0430 VBScript.<\/p>\n<h4>\u0420\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0442\u043e\u0432<\/h4>\n<p>  \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 3500 \u0445\u043e\u0441\u0442\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 1 \u0447\u0430\u0441. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u043a\u043e\u0434 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"vbscript\">WScript.Interactive = true  compid = 0  On Error Resume Next \t Set objDomain = GetObject(&quot;LDAP:\/\/DOMAIN\/OU=Workstations,DC=DOMAIN&quot;)   comps = Array()   for each objDomainItem in objDomain  \tif objDomainItem.objectClass = &quot;Computer&quot; then \t\tidxLast = UBound (comps) \t\tReDim Preserve comps(idxLast + 1) \t\tcomps(idxLast + 1) = objDomainItem.dNSHostName \tend if next  Set objFS = CreateObject(&quot;Scripting.FileSystemObject&quot;)  Set objNewFile = objFS.CreateTextFile(&quot;C:\\TEMP\\AV_Check\\Reports\\AV_Status_Scan_is_Running.WAIT&quot;)   a =    &quot;&lt;style&gt;&quot; a = a& &quot;@import &quot;&quot;TableFilter\/filtergrid.css&quot;&quot;;&quot; a = a& &quot;BODY{background-color:Lavender ;}&quot; a = a& &quot;TABLE{font-size: 10pt; font-family: arial;}&quot; a = a& &quot;TH{background-color: buttonface; }&quot; a = a& &quot;&lt;\/style&gt;&quot;   objNewFile.WriteLine &quot;&lt;html&gt;&quot; objNewFile.WriteLine &quot;&lt;head&gt;&quot; objNewFile.WriteLine &quot;&lt;script language=&quot;&quot;javascript&quot;&quot; type=&quot;&quot;text\/javascript&quot;&quot; src=&quot;&quot;TableFilter\/tablefilter.js&quot;&quot;&gt;&lt;\/script&gt;&quot; objNewFile.WriteLine &quot;&lt;title&gt;AntiVirus status information&lt;\/title&gt;&quot; objNewFile.WriteLine a & &quot;&lt;\/head&gt;&lt;body&gt;&quot; objNewFile.WriteLine &quot;&lt;h2&gt;AVSI -- Date: &quot; & Now() & &quot;&lt;\/h2&gt;&quot;  objNewFile.WriteLine &quot;&lt;script type=&quot;&quot;text\/javascript&quot;&quot;&gt;&quot; objNewFile.WriteLine &quot;var tableToExcel = (function() {&quot; objNewFile.WriteLine &quot;\tvar uri = 'data:application\/vnd.ms-excel;base64,'&quot; objNewFile.WriteLine &quot;\t, template = '&lt;html xmlns:o=&quot;&quot;urn:schemas-microsoft-com:office:office&quot;&quot; xmlns:x=&quot;&quot;urn:schemas-microsoft-com:office:excel&quot;&quot;&gt;&lt;head&gt;&lt;\/head&gt;&lt;body&gt;&lt;table&gt;{table}&lt;\/table&gt;&lt;\/body&gt;&lt;\/html&gt;'&quot; objNewFile.WriteLine &quot;\t, base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }&quot; objNewFile.WriteLine &quot;\t, format = function(s, c) { return s.replace(\/{(\\w+)}\/g, function(m, p) { return c[p]; }) }&quot; objNewFile.WriteLine &quot;return function(table, name) {&quot; objNewFile.WriteLine &quot;\tif (!table.nodeType) table = document.getElementById(table)&quot; objNewFile.WriteLine &quot;\tvar ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}&quot; objNewFile.WriteLine &quot;\twindow.location.href = uri + base64(format(template, ctx))&quot; objNewFile.WriteLine &quot;}&quot; objNewFile.WriteLine &quot;})()&quot; objNewFile.WriteLine &quot;&lt;\/script&gt;&quot; objNewFile.WriteLine &quot;&lt;input type=&quot;&quot;button&quot;&quot; onclick=&quot;&quot;tableToExcel('table1', 'Export data')&quot;&quot; value=&quot;&quot;Export data to Excel&quot;&quot;&gt;&quot; \t objNewFile.WriteLine &quot;&lt;table id=&quot;&quot;table1&quot;&quot; BORDER=&quot;&quot;1&quot;&quot; width=&quot;&quot;100%&quot;&quot;&gt;&quot;  objNewFile.WriteLine &quot;&lt;tr&gt;&lt;th width=&quot;&quot;2%&quot;&quot;&gt;id&lt;\/th&gt;&lt;th&gt;Computer&lt;\/th&gt;&lt;th&gt;AV Name&lt;\/th&gt;&lt;th&gt;AV Status&lt;\/th&gt;&lt;th&gt;AV Bases&lt;\/th&gt;&lt;th&gt;Host Status&lt;\/th&gt;&lt;\/tr&gt;&quot;  for each comp in comps  \tcompid = compid + 1  \t\t \tSet WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;) \tPing = WshShell.Run(&quot;ping -n 1 &quot; & comp, 0, True) \tSelect Case Ping \tCase 0 \t\tOn Error Resume next  \t\tSet oWMI = GetObject(&quot;winmgmts:\\\\&quot; & comp & &quot;\\root\\SecurityCenter2&quot;)  \t\tOn Error Resume next  \t\tSet colAVItems = oWMI.ExecQuery(&quot;Select * from AntiVirusProduct&quot;)  \t\tIf colAVItems.count = 0 Then  \t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;No AntiViruses found&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;Disabled&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;NOT Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\tElseIf colAVItems.count = 1 Then  \t\t\tFor Each AntiVirus in colAVItems \t\t\t\tIf (AntiVirus.displayName) &lt;&gt; &quot;Windows Defender&quot; Then  \t\t\t\t\tAVStatus = hex(AntiVirus.ProductState)  \t\t\t\t\tIf (AVStatus = &quot;61000&quot;)  _ \t\t\t\t\tOR (AVStatus = &quot;51000&quot;) _ \t\t\t\t\tOR (AVStatus = &quot;41000&quot;) Then  \t\t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Active&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\t\tElseIf (AVStatus = &quot;41010&quot;) _ \t\t\t\t\tOR (AVStatus = &quot;61010&quot;) _ \t\t\t\t\tOR (AVStatus = &quot;51010&quot;) Then \t\t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Active&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;NOT Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\t\tElseIf (AVStatus = &quot;60000&quot;) _ \t\t\t\t\tOR (AVStatus = &quot;50000&quot;) _ \t\t\t\t\tOR (AVStatus = &quot;40000&quot;) Then \t\t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;On Access scanning disabled!&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\t\tElse  \t\t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\t\tEnd if \t\t\t\tEnd If \t\t\tNext \t\tEnd If \tCase 1 \t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;Offline&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \tEnd Select Next objNewFile.WriteLine &quot;&lt;\/table&gt;&quot; \t objNewFile.WriteLine &quot;&lt;script language=&quot;&quot;javascript&quot;&quot; type=&quot;&quot;text\/javascript&quot;&quot;&gt;&quot; objNewFile.WriteLine &quot;\/\/&lt;![CDATA[&quot; objNewFile.WriteLine &quot;var tableFilters = {&quot; objNewFile.WriteLine &quot;\tsort_select: true,&quot; objNewFile.WriteLine &quot;\tloader: true,&quot; objNewFile.WriteLine &quot;\trows_counter: true,&quot; objNewFile.WriteLine &quot;\tcol_2: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\tcol_3: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\tcol_4: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\tcol_5: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\ton_change: true,&quot; objNewFile.WriteLine &quot;\tdisplay_all_text: &quot;&quot; [ Show all ] &quot;&quot;,&quot; objNewFile.WriteLine &quot;\talternate_rows: true,&quot; objNewFile.WriteLine &quot;}&quot; objNewFile.WriteLine &quot;setFilterGrid( &quot;&quot;table1&quot;&quot;,tableFilters);&quot; objNewFile.WriteLine &quot;\/\/]]&gt;&quot; objNewFile.WriteLine &quot;&lt;\/script&gt;&quot;  objNewFile.WriteLine &quot;&lt;h2&gt;End of scan: &quot; & Now() & &quot;&lt;\/h2&gt;&quot;  objNewFile.WriteLine &quot;&lt;\/body&gt;&quot; objNewFile.WriteLine &quot;&lt;\/html&gt;&quot; objNewFile.Close  objFS.MoveFile &quot;C:\\TEMP\\AV_Check\\Reports\\AV_Status_Scan_is_Running.WAIT&quot;, &quot;C:\\TEMP\\AV_Check\\Reports\\AV_Status_&quot; & Date & &quot;_&quot; & Hour(Now()) & &quot;.&quot; & Minute(Now()) & &quot;.htm&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0427\u0442\u043e \u0436\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u0410 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u043e\u0442 \u0447\u0442\u043e:<\/p>\n<p>  1) \u041c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0434\u043e\u043c\u0435\u043d\u0443 \u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 Workstations:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0434\u043e\u043c\u0435\u043d\u0443 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c LDAP<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"vbscript\">Set objDomain = GetObject(&quot;LDAP:\/\/DOMAIN\/OU=Workstations,DC=DOMAIN&quot;) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  2) \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u041f\u041a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c Computer:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"vbscript\">for each objDomainItem in objDomain \tif objDomainItem.objectClass = &quot;Computer&quot; then \t\tidxLast = UBound (comps) \t\tReDim Preserve comps(idxLast + 1) \t\tcomps(idxLast + 1) = objDomainItem.dNSHostName \tend if next <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  3) \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043e\u0442\u0447\u0435\u0442\u0430. \u041e\u0442\u0447\u0435\u0442 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 .htm \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u0441\u0430\u043c\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"vbscript\">Set objFS = CreateObject(&quot;Scripting.FileSystemObject&quot;)  Set objNewFile = objFS.CreateTextFile(&quot;C:\\TEMP\\AV_Check\\Reports\\AV_Status_Scan_is_Running.WAIT&quot;)   a =    &quot;&lt;style&gt;&quot; a = a& &quot;@import &quot;&quot;TableFilter\/filtergrid.css&quot;&quot;;&quot; a = a& &quot;BODY{background-color:Lavender ;}&quot; a = a& &quot;TABLE{font-size: 10pt; font-family: arial;}&quot; a = a& &quot;TH{background-color: buttonface; }&quot; a = a& &quot;&lt;\/style&gt;&quot;   objNewFile.WriteLine &quot;&lt;html&gt;&quot; objNewFile.WriteLine &quot;&lt;head&gt;&quot; objNewFile.WriteLine &quot;&lt;script language=&quot;&quot;javascript&quot;&quot; type=&quot;&quot;text\/javascript&quot;&quot; src=&quot;&quot;TableFilter\/tablefilter.js&quot;&quot;&gt;&lt;\/script&gt;&quot; objNewFile.WriteLine &quot;&lt;title&gt;AntiVirus status information&lt;\/title&gt;&quot; objNewFile.WriteLine a & &quot;&lt;\/head&gt;&lt;body&gt;&quot; objNewFile.WriteLine &quot;&lt;h2&gt;AVSI -- Date: &quot; & Now() & &quot;&lt;\/h2&gt;&quot;  objNewFile.WriteLine &quot;&lt;script type=&quot;&quot;text\/javascript&quot;&quot;&gt;&quot; objNewFile.WriteLine &quot;var tableToExcel = (function() {&quot; objNewFile.WriteLine &quot;\tvar uri = 'data:application\/vnd.ms-excel;base64,'&quot; objNewFile.WriteLine &quot;\t, template = '&lt;html xmlns:o=&quot;&quot;urn:schemas-microsoft-com:office:office&quot;&quot; xmlns:x=&quot;&quot;urn:schemas-microsoft-com:office:excel&quot;&quot;&gt;&lt;head&gt;&lt;\/head&gt;&lt;body&gt;&lt;table&gt;{table}&lt;\/table&gt;&lt;\/body&gt;&lt;\/html&gt;'&quot; objNewFile.WriteLine &quot;\t, base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }&quot; objNewFile.WriteLine &quot;\t, format = function(s, c) { return s.replace(\/{(\\w+)}\/g, function(m, p) { return c[p]; }) }&quot; objNewFile.WriteLine &quot;return function(table, name) {&quot; objNewFile.WriteLine &quot;\tif (!table.nodeType) table = document.getElementById(table)&quot; objNewFile.WriteLine &quot;\tvar ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}&quot; objNewFile.WriteLine &quot;\twindow.location.href = uri + base64(format(template, ctx))&quot; objNewFile.WriteLine &quot;}&quot; objNewFile.WriteLine &quot;})()&quot; objNewFile.WriteLine &quot;&lt;\/script&gt;&quot; objNewFile.WriteLine &quot;&lt;input type=&quot;&quot;button&quot;&quot; onclick=&quot;&quot;tableToExcel('table1', 'Export data')&quot;&quot; value=&quot;&quot;Export data to Excel&quot;&quot;&gt;&quot; \t objNewFile.WriteLine &quot;&lt;table id=&quot;&quot;table1&quot;&quot; BORDER=&quot;&quot;1&quot;&quot; width=&quot;&quot;100%&quot;&quot;&gt;&quot;  objNewFile.WriteLine &quot;&lt;tr&gt;&lt;th width=&quot;&quot;2%&quot;&quot;&gt;id&lt;\/th&gt;&lt;th&gt;Computer&lt;\/th&gt;&lt;th&gt;AV Name&lt;\/th&gt;&lt;th&gt;AV Status&lt;\/th&gt;&lt;th&gt;AV Bases&lt;\/th&gt;&lt;th&gt;Host Status&lt;\/th&gt;&lt;\/tr&gt;&quot;  { ... }  objNewFile.WriteLine &quot;&lt;\/table&gt;&quot; \t objNewFile.WriteLine &quot;&lt;script language=&quot;&quot;javascript&quot;&quot; type=&quot;&quot;text\/javascript&quot;&quot;&gt;&quot; objNewFile.WriteLine &quot;\/\/&lt;![CDATA[&quot; objNewFile.WriteLine &quot;var tableFilters = {&quot; objNewFile.WriteLine &quot;\tsort_select: true,&quot; objNewFile.WriteLine &quot;\tloader: true,&quot; objNewFile.WriteLine &quot;\trows_counter: true,&quot; objNewFile.WriteLine &quot;\tcol_2: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\tcol_3: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\tcol_4: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\tcol_5: &quot;&quot;select&quot;&quot;,&quot; objNewFile.WriteLine &quot;\ton_change: true,&quot; objNewFile.WriteLine &quot;\tdisplay_all_text: &quot;&quot; [ Show all ] &quot;&quot;,&quot; objNewFile.WriteLine &quot;\talternate_rows: true,&quot; objNewFile.WriteLine &quot;}&quot; objNewFile.WriteLine &quot;setFilterGrid( &quot;&quot;table1&quot;&quot;,tableFilters);&quot; objNewFile.WriteLine &quot;\/\/]]&gt;&quot; objNewFile.WriteLine &quot;&lt;\/script&gt;&quot;  objNewFile.WriteLine &quot;&lt;h2&gt;End of scan: &quot; & Now() & &quot;&lt;\/h2&gt;&quot;  objNewFile.WriteLine &quot;&lt;\/body&gt;&quot; objNewFile.WriteLine &quot;&lt;\/html&gt;&quot; objNewFile.Close  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d <a href=\"http:\/\/tablefilter.free.fr\/\">HTML Table Filter Generator<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u043f\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 \u043f\u043e\u043b\u044f\u043c\u0438 id, Computer, AV Name, AV Status, AV Bases.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 Excel, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0430\u0448\u0435\u043b \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0444\u043e\u0440\u0443\u043c\u0435 (\u0447\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u044f \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432\u043e\u0437\u0438\u043b\u0441\u044f \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043a\u0430\u043a \u0435\u0441\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0440\u0438\u0432\u043e \u0438, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 FireFox).<\/p>\n<p>  4) \u041c\u0430\u0441\u0441\u0438\u0432 \u0443 \u043d\u0430\u0441 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u0442\u0447\u0435\u0442\u0430. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f id \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0445\u043e\u0441\u0442\u0443 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c Shell \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0445\u043e\u0441\u0442\u0430 \u043f\u0443\u0442\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e 1 icmp \u043f\u0430\u043a\u0435\u0442\u0430. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0442\u043a\u043b\u0438\u043a\u0430, Case 0 \u2014 \u0445\u043e\u0441\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, Case 1 \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0445\u043e\u0441\u0442 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0445\u043e\u0441\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"vbscript\">for each comp in comps  \tcompid = compid + 1 \t\t \tSet WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;) \tPing = WshShell.Run(&quot;ping -n 1 &quot; & comp, 0, True) \tSelect Case Ping \tCase 0 \t\t{ ... } \tCase 1 \t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;Offline&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \tEnd Select Next <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  5) \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u0442\u044c \u043b\u0438 \u0443 \u043d\u0430\u0441 \u043e\u0448\u0438\u0431\u043a\u0438, \u0430 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0445\u043e\u0441\u0442\u0443. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u0410\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430\u043c, \u0410\u043d\u0442\u0438\u0448\u043f\u0438\u043e\u043d\u0430\u043c \u0438 \u041c\u0435\u0436\u0441\u0435\u0442\u0435\u0432\u044b\u043c \u044d\u043a\u0440\u0430\u043d\u0430\u043c \u0432 WMI \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \\root\\SecurityCenter2, \u043f\u043e-\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c WQL \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u0442\u044c \u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441, \u0430 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0435 Windows Defender \u043b\u0438 \u043e\u043d, \u0430 \u0435\u0441\u043b\u0438 \u0434\u0430\u0436\u0435 \u0438 \u043e\u043d, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e. \u041a\u0430\u0436\u0434\u044b\u0439 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043e\u0431 \u044d\u0442\u043e\u043c \u044f \u0443\u0437\u043d\u0430\u043b \u043d\u0430 <a href=\"http:\/\/neophob.com\/2010\/03\/wmi-query-windows-securitycenter2\/\">\u0444\u043e\u0440\u0443\u043c\u0435<\/a>:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0410\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"vbscript\">On Error Resume next  Set oWMI = GetObject(&quot;winmgmts:\\\\&quot; & comp & &quot;\\root\\SecurityCenter2&quot;)  On Error Resume next  Set colAVItems = oWMI.ExecQuery(&quot;Select * from AntiVirusProduct&quot;)  \tIf colAVItems.count = 0 Then  \t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;No AntiViruses found&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;Disabled&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;NOT Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \tElseIf colAVItems.count = 1 Then  \t\tFor Each AntiVirus in colAVItems \t\t\tIf (AntiVirus.displayName) &lt;&gt; &quot;Windows Defender&quot; Then  \t\t\t\tAVStatus = hex(AntiVirus.ProductState)  \t\t\t\tIf (AVStatus = &quot;61000&quot;)  _ \t\t\t\tOR (AVStatus = &quot;51000&quot;) _ \t\t\t\tOR (AVStatus = &quot;41000&quot;) Then  \t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Active&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\tElseIf (AVStatus = &quot;41010&quot;) _ \t\t\t\tOR (AVStatus = &quot;61010&quot;) _ \t\t\t\tOR (AVStatus = &quot;51010&quot;) Then \t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Active&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;NOT Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\tElseIf (AVStatus = &quot;60000&quot;) _ \t\t\t\tOR (AVStatus = &quot;50000&quot;) _ \t\t\t\tOR (AVStatus = &quot;40000&quot;) Then \t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;red&quot;&quot;&gt;On Access scanning disabled!&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Up to Date&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\tElse  \t\t\t\t\tobjNewFile.WriteLine &quot;&lt;tr&gt;&lt;th&gt;&quot; & compid & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & comp & &quot;&lt;\/th&gt;&lt;th&gt;&quot; & AntiVirus.displayName & &quot;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;purple&quot;&quot;&gt;Unknown&lt;\/font&gt;&lt;\/th&gt;&lt;th&gt;&lt;font color=&quot;&quot;green&quot;&quot;&gt;Online&lt;\/font&gt;&lt;\/th&gt;&lt;\/tr&gt;&quot; \t\t\t\tEnd if \t\t\tEnd If \t\tNext \tEnd If <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0411\u043e\u043d\u0443\u0441<\/h4>\n<p>  \u041d\u0443 \u0438 \u043a\u0430\u043a \u0431\u043e\u043d\u0443\u0441 \u043a\u043e\u0434 \u043d\u0430 Python. \u041e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 Excel (\u0432 \u0432\u0438\u0434\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u2014 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044f). \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c LDAP \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0445\u043e\u0441\u0442\u043e\u0432 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043f\u0430\u0434\u0430\u0435\u0442, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0430\u043c \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import wmi import codecs import os  with open('Comp_list.txt','r') as list:  \tfile = codecs.open('text.txt', 'w', 'utf-8')  \tfile.write(&quot;Computer&quot; + &quot;\tAV Name&quot; + &quot;\tHost Status&quot; + &quot;\tAV Status&quot; + &quot;\tAV Bases\\n&quot;)  \tfor comp in list: \t\tresponse = os.system(&quot;ping -n 1 &quot; + comp) \t\tif response == 0: \t\t\tpath = '\/\/%s\/root\/SecurityCenter2' % comp \t\t\tc = wmi.WMI(moniker=path) \t\t\twql = &quot;Select * from AntiVirusProduct&quot; \t\t\twql = c.query(wql) \t\t\tif wql == []: \t\t\t\tfile.write(comp + &quot;\tno AntiVirus found&quot; + &quot;\tOnline&quot; + &quot;\tUnknown&quot; + &quot;\tUnknown\\n&quot;) \t\t\telse: \t\t\t\tfor AntiVirus in wql: \t\t\t\t\tProductState_in_hex = str(hex(AntiVirus.ProductState)) \t\t\t\t\tcheck_install = ProductState_in_hex[0:3] \t\t\t\t\tcheck_state = ProductState_in_hex[3:5] \t\t\t\t\tcheck_updates = ProductState_in_hex[5:7] \t\t\t\t\tif check_state == &quot;10&quot; and check_updates == &quot;00&quot;: \t\t\t\t\t\tfile.write(comp + &quot;\t&quot; + AntiVirus.displayName + &quot;\tOnline&quot; + &quot;\tActive&quot; + &quot;\tUp to Date\\n&quot;) \t\t\t\t\telif check_state == &quot;10&quot; and check_updates == &quot;10&quot;: \t\t\t\t\t\tfile.write(comp + &quot;\t&quot; + AntiVirus.displayName + &quot;\tOnline&quot; + &quot;\tActive&quot; + &quot;\tNOT Up to Date\\n&quot;) \t\t\t\t\telif check_state == &quot;00&quot; and check_updates == &quot;00&quot;: \t\t\t\t\t\tfile.write(comp + &quot;\t&quot; + AntiVirus.displayName + &quot;\tOnline&quot; + &quot;\tOn Access scanning disabled!&quot; + &quot;\tUp to Date\\n&quot;) \t\t\t\t\telif check_state == &quot;00&quot; and check_updates == &quot;00&quot;: \t\t\t\t\t\tfile.write(comp + &quot;\t&quot; + AntiVirus.displayName + &quot;\tOnline&quot; + &quot;\tOn Access scanning disabled!&quot; + &quot;\tNOT Up to Date\\n&quot;) \t\t\t\t\telse: \t\t\t\t\t\tfile.write(comp + &quot;\t&quot; + AntiVirus.displayName + &quot;\tOnline&quot; + &quot;\tUnknown state\\n&quot; + &quot;\t&quot; + check_install) \t\telse: \t\t\tfile.write(comp + &quot;\tUnknown&quot; + &quot;\tOffline&quot; + &quot;\tUnknown&quot; + &quot;\tUnknown\\n&quot;) \tfile.close()  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"clear\"><\/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=\"https:\/\/habrahabr.ru\/post\/279049\/\"> https:\/\/habrahabr.ru\/post\/279049\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u0443\u0434\u0438\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c\u0443 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443, \u0434\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0436 \u0434\u043e\u043b\u0433\u043e, \u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e. \u0420\u0435\u0448\u0435\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u043a\u043e\u0441\u0442\u044b\u043b\u044c\u00bb \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430\u0445 \u0432 \u0434\u043e\u043c\u0435\u043d\u0435.<\/p>\n<p>  <i>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/i>  <\/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-275929","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/275929","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=275929"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/275929\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}