Skip to content

Instantly share code, notes, and snippets.

@jfrmilner
Last active May 10, 2021 13:03
Show Gist options
  • Save jfrmilner/413bc7b5c3c524bb06dacf51a4c70eb1 to your computer and use it in GitHub Desktop.
Save jfrmilner/413bc7b5c3c524bb06dacf51a4c70eb1 to your computer and use it in GitHub Desktop.
Get McAfee Endpoint Security AV Status for use with Science Logic Monitoring
<#
Get McAfee Endpoint Security AV Status for use with Science Logic Monitoring
Auth: jfrmilner
#>
$version = Get-ItemProperty -Path 'HKLM:SOFTWARE\McAfee\Endpoint\Common'
$path = Get-ItemProperty -Path 'HKLM:SOFTWARE\McAfee\AVSolution\DS\DS'
$szContentCreationDateTime = Get-Date ($path.szContentCreationDate + " " + $path.szContentCreationTime)
$timeSpan = New-TimeSpan -Start $szContentCreationDateTime
$result = New-Object PSObject -Property @{
'Name' = 'McAfee Endpoint Security'
'Version' = ($version.ProductVersion + '.' + $version.BuildNumber)
'WriteTime' = $szContentCreationDateTime
'Days' = $timeSpan.Days
'Definition' = ($path.dwContentMajorVersion.ToString() + '.' + $path.dwContentMinorVersion.ToString())
}
Write-Output $result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment