Powershell Registry value to be used as variable

Posted by CWL on Server Fault See other posts from Server Fault or by CWL
Published on 2012-09-01T13:30:41Z Indexed on 2012/09/01 15:39 UTC
Read the original article Hit count: 220

Filed under:
|

I am looking on how to return one value from the registry. I only want the AGENTGUID value from this command.

$reg=reg query "\\$computer\HKLM\SOFTWARE\Wow6432Node\Network Associates\ePolicy Orchestrator\Agent" /v Agentguid

$reg will return this as one line. I only need {F789B761-81BE-4357-830B-368B5B3CF5E5} HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Network Associates\ePolicy Orchestrator\Agent Aentguid REG_SZ {F789B761-81BE-4357-830B-368B5B3CF5E5}

© Server Fault or respective owner

Related posts about powershell

Related posts about registry