title: Setting both Name and GUID as a variable WMIC Product Get
body: <p>I'm trying to create a basic script to uninstall an application across all our endpoints using cmd; </p>
  
  <p>msiexec /quiet /norestart /uninstall {xxxx-xxx-xxx-xxxx-xxxxx}</p>
  
  <p>Due to different versions, the same app may have multiple GUIDs on different endpoints</p>
  
  <p>How can I run the <code>wmic product get name,IdentifyingNumber</code> cmdlet to search for a specific application and set it's GUID also to a variable?</p>
  
  <pre><code>wmic product get name,IdentifyingNumber"
  IdentifyingNumber                       Name
  {E8CAD3B5-7016-45AE-97DF-098B5C8D4AC8}   App1
  {90160000-008C-0000-1000-0000000FF1CE}   App
  </code></pre>
  
  <p>I can find and match the Application to a variable, bit is struggling setting the GUID to a variable.</p>
  
  <pre><code>FOR /F "tokens=2 delims==" %%A IN ('WMIC product GET Name /VALUE ^| FIND /I "App1"') DO SET _application=%%A
  ECHO Application: "%_application%"
  Rem ECHO GUID:%_GUIDVALUE% //Matching Application GUID
  </code></pre>
  
  <p>Any help would appreciated</p>