##Here remote registry details of Symantec client used as an example ###########
############FyzelSalih#############
##Point the list of servers
$servername = Get-Content 'c:\log\allservers.txt'
# Check the Latest virus Definition Date and Revision
Foreach($server in $servername){
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$server)
$key = $Reg.OpenSubKey("SOFTWARE\Symantec\Symantec Endpoint Protection\CurrentVersion\public-opstate")
$date1 = $key.getvalue("LatestVirusDefsDate")
$rev = $key.getvalue("LatestVirusDefsRevision")
"$date1 r$rev" | Out-file c:\$(get-date -f dd-MMMM-yyyy).csv -append
}
No comments:
Post a Comment