Just started with SCCM and am slowly getting my feet wet.  I have been tasked with creating a simple query but I'm finding it's not so simple. 

We are running Office 365 ProPlus and I have been tasked with creating a query that will tell me what version of the product is running on every machine.  We are checking to see how many computers are updated to the newest version.

I tried this but it says it has syntax errors.  I'm copying and pasting this one and I don't know where the error is as I have no idea what the proper structure would be.  Can anyone educate me in how to do this?  

select SMS_R_System.NetbiosName, SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version, SMS_G_System_ADD_REMOVE_PROGRAMS.ProdID from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%Microsoft Office 365 ProPlus - en-us%”
Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answer Chosen by the Author

0
Fixed it!

select SMS_R_System.NetbiosName, SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version, SMS_G_System_ADD_REMOVE_PROGRAMS.ProdID from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Microsoft Office 365 ProPlus - en-us%"

Looks the same? Almost, check your quotes next time (;
" and
You need stright quotes, always check in Notepad++ or your fav notepad for the correct quotes when you copy and paste from the interwebs.

Answered 05/09/2016 by: rileyz
Red Belt

  • Thats what I get for copypasta!!! Thanks a lot!!!!
Please log in to comment

Answers

0
There will be a 'canned' report you can use from SCCM - saves creating the query yourself. When Im at work on Monday I'll dig it out for you. The reports the SCCM provide are quite vast and to pick the right one can be a bit of a nightmare.
Answered 05/07/2016 by: rileyz
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity