This blog is a step-by-step example for the configuration of email notification for Configuration Manager Reports and well as for deleting the email subscriptions. We will also cover a bit of background changes (like in database & SSRS Config file) when things are implemented.
Introduction
“Email notification of Reports,” as the name suggests, is used to create a notification for any report we need to get on specific time or on repeated intervals. You can get a report link over an email or you can get report itself mailed to you. You can use a local SMTP service or a remote SMTP server or forwarder to support e-mail delivery. If you have access to an existing remote SMTP server, you should consider using it.
Steps to create email subscription
Browse to MonitoringOverviewReportingReports on SCCM console. Select any report for which you want to create email subscription and click on the Create Subscription at the top on console as shown below:
When Create Subscription Wizard is open, Report delivered by will have only one option, Windows File Share. You will not see any option for creating Email Notification
To get Email option, we need to configure SSRS (SQL Server Reporting Services) first. Open Reporting Services Configuration Manager console and go to E-mail Settings.
Configure Sender Address and SMTP Server details, click on Apply and I will be configured as shown below:
When the E-mail Settings are applied, this information will be written into rsreportserver.config file which you can find at following location. <Installation Drive:ProgramFilesMicrosoft SQL ServerMSRS12.MSSQSERVERReporting ServicesReportServer> Value of MSRS12.MSSQSERVER will vary as per the version of SQL Server, for example: MSRS11.MSSQSERVER If we open this file rsreportserver.config and search with the name of our SMTP Server, we will find the updated information here, as shown below:
NOTE: Please do not open this file because if you make any irrelevant change by mistake in this file, you will end up messing your SSRS (SQL Server Reporting Services). The only reason to include screenshot is just to share the information for troubleshooting scenarios; for example: you configured the e-mail settings in SSRS but its not getting reflected or fails to Apply, etc.
Go back to SCCM console and try to create the Subscription again.
Now you will get an option for creating email subscription:
Select Email and it will appear like below:
Now configure the required fields as shown below, also select whether you need just the Report Link, Reports itself or both as well as the Report Format:
Click Next and specify the scheduled as required.
Select the parameter value for which you need the Report.
Check the Summary and proceed further.
Complete the Setup and its done.
If you enable the Verbose logging for SCCM Console, you see the below information in logs. I have copied only few lines and highlighted the important once. You can see the following highlighted information:
- Report Name
- Available delivery extension
- Parameters you selected for Report
- DoWork and RunWorkerComplete steps.
SMSAdminUI.log XML loaded from C:Program Files (x86)Microsoft Configuration ManagerAdminConsole\XmlStorageFormscreatereportsubscriptionwizard.xml
[PRI1.contoso.local] : Retrieving report parameters for [/ConfigMgr_PRI/Administrative Security/Administration activity log].
[PRI1.contoso.local] : Found delivery extension [Report Server FileShare].
[PRI1.contoso.local] : Found delivery extension [Report Server Email].
[ParameterPresenter] Retreiving parameters for report [Administration activity log].
[ParameterPresenter] Loading parameters for report [/ConfigMgr_PRI/Administrative Security/Administration activity log].
[PRI1.contoso.local] : Retrieving report parameters for [/ConfigMgr_PRI/Administrative Security/Administration activity log].
[ParameterControl] [admin]: Initializing default values.
[ParameterControl] [admin]: Adding parameter value [<All values>] to the list of values.
[ParameterControl] [type]: Initializing default values.
[ParameterControl] [type]: Adding parameter value [0] to the list of values.
[ParameterControl] [DateRange]: Initializing default values.
backgroundWorkerPostApply_DoWork
backgroundWorkerPostApply_RunWorkerCompleted
This new Subscription info will be inserted in Report Server Database with a unique SubscriptionID You can verify the same by running the query Select * from Subscriptions in Report Server Database as shown below:
Browse to MonitoringOverviewReportingSubscriptions to check the Subscription you created.
You can also make any changes to the subscription you created by going into the properties of the same.
Now you can receive Configuration Manager Reports on emails as scheduled automatically.
Steps to remove email subscription
The purpose of additionally including this step is simply to save you from console crash issue. It appears very simple to delete the subscriptions and it is, but it must be done in correct order as specified below. 1. Delete the subscriptions from SCCM Console 2. Delete the Email Settings from SSRS
Reason: If you will delete the Email Settings from SSRS first, then every time when you will click on Subscription at Configuration Manager Console, it will crash.
Then you must either reconfigure the Email Settings in SSRS or you must manually delete all the existing Subscriptions from Report Server Database to resolve the Configuration Manager Console crash issue. So, its better to follow the correct steps. Hope this helpful to you. Happy Learning!
Additional Information
Configure a Report Server for E-Mail Delivery (SSRS Configuration Manager) https://msdn.microsoft.com/en-us/library/ms159155(v=sql.120).aspx
Rafid Ali, Support Engineer, Microsoft Enterprise Cloud Group