(view source code of login_log_av_win7.ps as plain text)
$Today = Get-Date -Format 'yyyyMMdd'
# Append AV program name(s) and timestamp(s) to log file
$AV1 = ( Get-WmiObject -Class AntiVirusProduct -Namespace 'root\SecurityCenter2' )
$AV2 = ( $AV1 | Format-Table -Property displayName,timestamp )
$AV2 | Out-File -FilePath "\\Server\Logs\$Today\$Env:UserName.log" -Encoding ASCII -Append
# The 3 lines above may be joined into a single line
page last modified: 2024-04-16; loaded in 0.0059 seconds