Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Antivirus Check in Login Script

HTVi
TV Discussion Newsgroups

Antivirus Check in Login Script
MTechG 5/23/2007 5:22:01 PM

I got this link from MCPMag.com
http://mcpmag.com/columns/article.asp?EditorialsID=1768#post

For all of my remote users I'd like validate that some form of Antivirus is
installed and uptodate before they are validated to login. Would using a
PowerShell Script be the best way to do this or is there a better way using
AD? With a PowerShell Script would it be able to return these types of
variables? I've never used it before but seems very powerful just from the
test I've done from the article. All my clients are Win2k and XP.

TIA

D
Re: Antivirus Check in Login Script
Jeffery Hicks <jhicks[ at ]sapien.com> 5/23/2007 5:48:02 PM
MTechG wrote:
[Quoted Text]
> I got this link from MCPMag.com
> http://mcpmag.com/columns/article.asp?EditorialsID=1768#post
>
> For all of my remote users I'd like validate that some form of Antivirus is
> installed and uptodate before they are validated to login. Would using a
> PowerShell Script be the best way to do this or is there a better way using
> AD? With a PowerShell Script would it be able to return these types of
> variables? I've never used it before but seems very powerful just from the
> test I've done from the article. All my clients are Win2k and XP.
>
> TIA
>
> D
I used PowerShell because 1) it made for an easy example and 2) I
wanted people to learn more about it. The real work is using WMI. You
could write a VBScript to query WMI for the same information.

Set objWMI=GetObject("WinMgmts://localhost\root\SecurityCenter")
strQuery="Select CompanyName,DisplayName,VersionNumber from
AntivirusProduct"
Set colItems=objWMI.ExecQuery(strQuery)
For Each prod In colItems
WScript.Echo prod.CompanyName
WScript.echo prod.Displayname
WScript.Echo prod.VersionNumber
Next

You made a comment about validating a user before they can logon. Once
the logon process starts I don't think you can terminate it. You can
display/check antivirus info, but if you don't like it I don't think you
can prevent the user from logging on. At least with a simple VBScript.

Finally, if I recall, this class is not available on Windows 2000.

--
Jeffery Hicks
SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com
VBScript & Windows PowerShell Training -
www.ScriptingTraining.com/classes.asp
Windows PowerShell? - www.SAPIENPress.com/powershell.asp

blog: http://blog.SAPIEN.com
blog: http://jdhitsolutions.blogspot.com

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen