Monday, March 7, 2011

Is there a way to check the MS Security Center for virus protection status?

We are in a Windows environment and looking to automate this process for non-company machines. If a vendor comes on site, we'd like to be able to have him/her hit a website that can perform a quick scan of the workstation to determine if they have the proper MS KB patches and if their virus scanner dats are up to date.

I can scan for the KB updates relatively easy, what I'm having a hard time finding is a way to check the virus dat status and since there are so many different engines out there, it seemed to make sense to use the (built into XP at least) proprietary MS security center stuff.

Eventually we'd like to have our routers redirect non-company machines to a website that will force validation, but until that point it will be a manual process.

Any thoughts?

From stackoverflow
  • In Windows Vista there are some new APIs to interface with the Security Center component status: http://msdn2.microsoft.com/en-us/library/bb963845(VS.85).aspx

    Through WMI, here's a VBS code snippet I checked out on http://social.msdn.microsoft.com/forums/en-US/windowssecurity/thread/bd97d9e6-75c1-4f58-9573-9009df5de19b/ to dump Antivirus product information:

        Set oWMI = GetObject
    ("winmgmts:{impersonationLevel=impersonate}!\\.\root\SecurityCenter")    
        Set colItems = oWMI.ExecQuery("Select * from AntiVirusProduct")    
    
        For Each objAntiVirusProduct In colItems    
        msg = msg & "companyName: " & objAntiVirusProduct.companyName & vbCrLf    
        msg = msg & "displayName: " & objAntiVirusProduct.displayName & vbCrLf    
        msg = msg & "instanceGuid: " & objAntiVirusProduct.instanceGuid & vbCrLf    
        msg = msg & "onAccessScanningEnabled: "
     & objAntiVirusProduct.onAccessScanningEnabled & vbCrLf    
        msg = msg & "productUptoDate: " & objAntiVirusProduct.productUptoDate & vbCrLf    
        msg = msg & "versionNumber: " & objAntiVirusProduct.versionNumber & vbCrLf    
        msg = msg & vbCrLf  
    
        Next
    
        WScript.Echo msg
    

0 comments:

Post a Comment