Powershell – how to generate sccm reports using power-shell ? “installed software on a specific computer”

powershellreportingsccm-2012-r2

In Sccm, normally I generate a report for a pc for "installed software on a specific computer" using gui in the following manner.
enter image description here

then enter pc name and by clicking view report.

enter image description here

My question is,

I am trying to create it using powershell by login to scccm server using https://blogs.technet.microsoft.com/enterprisemobility/2013/03/27/powershell-connecting-to-configuration-manager/

is it possible to generate above report using powershell ? could not find any suitable document or tutorial to do that. Any help would be greatly appreciated !

Ps:
my intention is to generate /grab software installed on remote pcs using a script. I use sccm reports because sccm database has already stored it and even if the remote pc is not online, we can just generate the report without accessing the remote pc.

Best Answer

Are you trying to distribute the reports via email by running a powershell script? SCCM has SQL Server Reporting Services. SSRS allows you to subscribe to reports and send it via email. If you looking at some custom data in the report, then you will need to create a custom report in SCCM.

If you still want to use powershell, then you would need to query the SCCM database. For that you would need to use SQLPS module and run the query which is embedded in the built in report or run your own custom query.

Install SQL PS Module

Hope this helps!