Friday, May 20, 2016

Get Symantec Version from Registry - Remote machines

# 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

Windows Server 2016 Key Features and License Prospects

If you are planning to move to Windows 2016 and looking for benefits, I have listed down below : Why Windows Server 2016? ·     ...