Last active
May 10, 2021 13:03
-
-
Save jfrmilner/413bc7b5c3c524bb06dacf51a4c70eb1 to your computer and use it in GitHub Desktop.
Get McAfee Endpoint Security AV Status for use with Science Logic Monitoring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
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