This content has been marked as final. Show 2 replies
I *think* this will do it:
SELECT pr.Name AS [ProductName] ,m.NetBiosName ,mpv.Name ,mpv.Status ,mpv.PatchStatus ,mpv.[Type] ,(Cast(mpv.Major AS VARCHAR(10)) + '.' + Cast(mpv.Minor AS VARCHAR(10)) + '.' + Cast(mpv.Build AS VARCHAR(10)) + '.' + Cast(mpv.Revision AS VARCHAR(10)) ) AS [BaseVersion] ,(Cast(mpv.PatchMajor AS VARCHAR(10)) + '.' + Cast(mpv.PatchMinor AS VARCHAR(10)) + '.' + Cast(mpv.PatchBuild AS VARCHAR(10)) + '.' + Cast(mpv.PatchRevision AS VARCHAR(10)) ) AS [PatchVersion] FROM [MachinePackagesView] mpv INNER JOIN [Machines] m ON m.MachinePK = mpv.MachineKey INNER JOIN [Packages] pa ON mpv.PackageKey = pa.PackagePK INNER JOIN [Products] pr on pa.ProductFK = pr.ProductPK AND (mpv.Status <> 6 OR (mpv.PatchStatus <> NULL AND mpv.PatchStatus <> 6))
A status of 6 means Installed, so the query is checking that either the status of the base package is not Installed, or there's an assigned patch whose state is not Installed.
Greg Ford wrote:
I *think* this will do it.
Thank you for the script. It worked without any additional modifications.
After running the query I also realized, the computer objects that are returned are the same that appear in the Appsense MC Management console, as having a Deployed % that is not 100%. I had not realized the same info was in the Appsense MC.