Find out the current version and update of an installed application
<p>I have some requirement where I have to find out the <em>current version</em> and <em>update details</em> of an installed application (highlighted):</p>

<p><a href="https://i.stack.imgur.com/oPlvV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oPlvV.jpg" alt="enter image description here"></a></p>

<p>And I have this PowerShell snippet for modification:</p>

<pre><code>$server="XXXXXXXXXX"

$ServiceInfo = Get-WmiObject win32_service -ComputerName $server -ExpandProperty Version | Where-Object {$_.Name -eq "VSTTAgent"} 
if($ServiceInfo.State -eq "Running")
{
    $userAccount = $ServiceInfo.DisplayName.ToString()
    Write-Host ("VSTTAgent service is Running on $server and  $userAccount  ")                  
}
</code></pre>