I will like know the versiĆ³n of the agent of AV Mcafee and Endpoint , it's obvious that I do not have connection at ePo console.
I got this script:
$AgentVer = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine",$Computer).OpenSubKey('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\McAfee\AgentVersion').GetValue('AgentVersion')
$ProductVer = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$Computer).OpenSubKey('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\McAfee\SystemCore').GetValue('')
" $AgentVer Agent version: $AgentVer
$computer Product version: $ProductVer
But when execute I obtain:
You cannot call a method on a null-valued expression. At line:2 char:1 + $AgentVer = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMa ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At line:3 char:1 + $ProductVer = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('Local ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Agent version: 10.1.1.1 Product version:
I don't know how follow, any can help me ?
A greeting and thanks