Automate query and mail sending SCCM

Nick FC 21 Reputation points
2022-03-30T23:18:58.293+00:00

Hi, how are you? I am internalizing with SCCM as I do not have too much experience.

I need to send every month from SCCM a report with all users who are local administrators of their computers, although this part I have solved, my question focuses on whether there is the possibility for example with CMPivot to automate the query and then send it by mail. That is, program the query to be performed automatically and then once the query is generated, automatically mail it to a certain address.
If this task is not possible, any suggestions or workarounds would be appreciated.

Thank you very much!!!

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,170 questions
Microsoft Configuration Manager
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,371 Reputation points
    2022-04-01T10:42:41.96+00:00

    Hi @Nick FC

    If you have already installed SQL Reporting Services and installed the Reporting Services Point in SCCM you will be able to copy the report you create to SQL reporting services, you do that under Reporting, Reporting Services, \Servername right click and select copy report, then you can copy your custom report to Reporting services. After that you can right-click your report and select New Subscription and confiure it when and how you want it delivered. It is a builtin feature of SQL Reporting Services and the Reporting Services Point in SCCM. Using Reporting Services you can schedule and e-mail a report in -pdf format for instance.

    Here are more information about SQL Reporting Services in SCCM

    http://technet.microsoft.com/en-us/library/cc512033.aspx

    To configure a subscription on a specific report, following the guide on TechNet: http://technet.microsoft.com/en-us/library/cc872783.aspx. This guide contains a link to configuring SSRS to deliver the report as this is actually an SSRS capability and not a ConfigMgr one.

    If you are unfamiliar with SSRS and the Reporting Services Point, I suggest you read through the TechNet docs at http://technet.microsoft.com/en-us/library/cc431393.aspx as its a little more involved than the classic reporting available using a Reporting point.

    Hope this helps with your query!

    --
    --If the reply is helpful, please Upvote and Accept as answer--


  2. Amandayou-MSFT 11,046 Reputation points
    2022-04-04T04:15:14.51+00:00

    Hi @Nick FC

    Thanks for posting in Q&A.

    We could use reports and send the emails automatically, as your mentioned, the problem we have solved, here is the article we could refer to:
    https://techcommunity.microsoft.com/t5/configuration-manager-archive/configuring-email-notification-for-configuration-manager-reports/ba-p/274241

    Agree with Garth, it maybe hard to send the email automatically by using cmpivot, we should create it and send it manually.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.