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
|