# to read registry and output Symantec version
# you can also use this script to get any registry from machines
$HKLM = 2147483650 #HKEY_LOCAL_MACHINE
# Attribute declaration
$SERVERS = get-content "C:\temp\Hosts.txt"
# place your machines IP or names on this file
foreach($Serv in $SERVERS)
{
$reg = [wmiclass]'\\'+$Serv+'\root\ default:StdRegprov'
$key = "SOFTWARE\Symantec\Symantec Endpoint Protection\CurrentVersion" | Select productversion"
$value = "productversion"
$reg.GetStringValue($HKLM, $key, $value)
## REG_SZ
}
}
No comments:
Post a Comment