title: Powershell Get MSI file GUID
body: <p>In order to find an installed MSI file <strong>GUID</strong> in a remote VM - I'm using the following command inside of <code>Invoke-Command</code>: <br/>
  <code>Get-WmiObject Win32_Product | Where-Object {$_.Name -eq &quot;Application Name&quot;}</code><br/>
  This command shows in it's output an identifier number. <br/>
  I know, I should add one more thing to this command in order to get only the GUID but I don't know how...</p>
  <p>Now, I need to compare between this GUID to a GUID of a new MSI file I got for an installation.</p>
  <p>This mean that: <br/>
  if the GUID of the new file is older - I'll do nothing <br/>
  if the GUID of the new file is equal - I'll do nothing <br/>
  if the GUID of the new file is newer - I'll do an upgrade OR uninstall-install process...</p>
  <p>So, In order to compare between the installed MSI's GUID and a new MSI file's GUID: <br/>
  What will be the exact <strong>PowerShell</strong> command to find the GUID of the <strong>new MSI file</strong>?</p>