title: Script powershell for know Mcafee agent Version and Protection Version
body: <p>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.</p>
  
  <p>I got this script:</p>
  
  <pre><code>$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
  </code></pre>
  
  <p>But when execute I obtain:</p>
  
  <pre>
  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: 
  </pre>
  
  <p>I don't know how follow, any can help me ?</p>
  
  <p>A greeting and thanks</p>