【发布时间】:2019-03-20 18:47:49
【问题描述】:
我想知道 AV Mcafee 和 Endpoint 的代理版本,很明显我在 ePo 控制台上没有连接。
我得到了这个脚本:
$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
但是执行时我得到:
您不能在空值表达式上调用方法。 在行:2 字符:1 + $AgentVer = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMa ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull 您不能在空值表达式上调用方法。 在行:3 字符:1 + $ProductVer = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('本地 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull 代理版本: 10.1.1.1 产品版本:我不知道怎么跟,有大神能帮帮我吗?
问候和感谢
【问题讨论】:
标签: powershell