-1

I work in an entreprise with a lot of pcs > 1000 with os windows xp and 7 and symantec antivirus installed on it the probleme is : -how to check if the antivirus is installed on the computers -and also enabled -then send the alert a message to the administrator

Another thing it will be best if it was vbscript

If you have ideas please share it Thanks very much

monmon
  • 11
  • 1
  • 2

2 Answers2

1

If they are Windows XP you can do the following:

wmic /node:@serverlist.txt /namespace:\\root\SecurityCenter path AntiVirusProduct get /value

for Vista+:

wmic /node:@serverlist.txt /namespace:\\root\SecurityCenter2 path AntiVirusProduct get /value

That will run wmic against all of the servers in the serverlist.txt file

And if you need a powershell way of doing it, check here: http://blog.powershell.no/2011/06/12/use-windows-powershell-to-get-antivirus-product-information/

Here is the reference for the state of the AV product from the powershell script linked above. You can use this to make sure the AV is installed (if a server comes back with "No Instance Available"), enabled and up to date.

"262144" {$defstatus = "Up to date" ;$rtstatus = "Disabled"} 
"262160" {$defstatus = "Out of date" ;$rtstatus = "Disabled"} 
"266240" {$defstatus = "Up to date" ;$rtstatus = "Enabled" "Consolas">} 
"266256" {$defstatus = "Out of date" ;$rtstatus = "Enabled"} 
"393216" {$defstatus = "Up to date" ;$rtstatus = "Disabled"} 
"393232" {$defstatus = "Out of date" ;$rtstatus = "Disabled"} 
"393488" {$defstatus = "Out of date" ;$rtstatus = "Disabled"} 
"397312" {$defstatus = "Up to date" ;$rtstatus = "Enabled"} 
"397328" {$defstatus = "Out of date" ;$rtstatus = "Enabled"} 
"397584" {$defstatus = "Out of date" ;$rtstatus = "Enabled"} 
mubix
  • 171
  • 3
0

You can use group policys to set a logon script that runs a powershell script to see if the program is installed. Powershell Reference

However, why are you reinventing the wheel? You could just use Symantec Antivirus Management Console...

Reaces
  • 5,597
  • 4
  • 38
  • 46
  • i don't know because i think it can't be installed without a licence i just want to know if this console run automaticly without administrator intervention, in the moment he detects the problem he send a message to IT department? – monmon Sep 05 '14 at 13:28