question

net1994-7989 avatar image
0 Votes"
net1994-7989 asked Garth commented

Query for every version of MS Office?

Hello all - I've been trying to find a query that will show us every version of office installed on our systems. Be it 32 or 64-Bit. From Office 2007 (yes, really) to the most current O365 channel build. This would encompass both MSI based installs as well as the more recent click to run installs. I looked on the interwebs, and it seems like a painful cobbling together multiple query's.

Anyone know of a single WQL query that would cover all of these possibilities in one view? We are using MECM current release build and have ~5k pcs.

mem-cm-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AllenLiu-MSFT avatar image
0 Votes"
AllenLiu-MSFT answered

Hi, @net1994-7989
Thank you for posting in Microsoft Q&A forum.
Since you are using MECM, why not use a SQL query, you may try below SQL query to see if it helps:

 SELECT DISTINCT  
   SYS.Name0
   ,ARP.DisplayName0 As 'Software Name'
   ,ARP.Version0 As 'Version'
   ,ARP.InstallDate0 As 'Installed Date'
  FROM 
   dbo.v_R_System As SYS
   INNER JOIN dbo.v_Add_REMOVE_PROGRAMS As ARP On SYS.ResourceID = ARP.ResourceID 
  WHERE   
  (ARP.DisplayName0 LIKE '%Microsoft % Standard%'
  OR ARP.DisplayName0 LIKE 'Microsoft % Professional%'
  OR ARP.DisplayName0 LIKE 'Microsoft % Enterprise %')
  ORDER BY Name0 ASC


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

net1994-7989 avatar image
0 Votes"
net1994-7989 answered Garth commented

Hi Allen - We've always used/preferred WQL queries vs SQL. Also it looks like your query would only return 32-Bit office installs? We need both 32 and 64-Bit installs

Thanks!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Wql query are for collection, where as Sql queries are for reporting. Are you trying to create a collect or a report? For a report what is wrong with the built in report for this?

0 Votes 0 ·
AllenLiu-MSFT avatar image
0 Votes"
AllenLiu-MSFT answered

Hi, @net1994-7989
The SCCM view v_Add_REMOVE_PROGRAMS contains 32-bit and 64-bit operating systems, so the sql view will return both 32 and 64
bit applications.

If you have Asset Inteligence classes for Installed Software enabled in your sccm environment, and to use WQL query, we can use the WMI class SMS_G_System_INSTALLED_SOFTWARE, it's already combining the 32-bit and 64-bit installed applications.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.