Application Approval Request Notification from Configuration Manager 2012 using Powershell


Hi all,

 

Today I was working at a customer and configuring the Application Catalog using Configuration Manager 2012 R2. The customer was interested in the application approval process but was a little disappointed that out-of-the-box it’s not possible to receive notifications when an approval request arrives in Configuration Manager.

As the customer only has Configuration Manager it’s not possible to use any other System Center product like Orchestrator or Service Manager to get things going.

I created an alternative under the form of a Powershell script that runs on a specific schedule (eg. Once every day) to gather all application requests that have a pending approval. This report is emailed to the IT mailbox of the customer. This also makes sure that an administrator doesn’t have to check every now and then in the approval request section of the Configuration Manager console to see if anything new has arrived.

What the script does is basically the following:

  • Reading all data from the WMI class SMS_UserApplicationRequest
  • Filtering all requests which have a current state of 1 ( which means requested)
  • Creating an HTML document which displays a table with all pending requests
  • Sending an email to the IT mailbox with the table as contents. The table contains per request: username, application name, comments and last modified date

The report looks as follows

Application_request_27052014_1

Anyone that might be interested in this script can comment below and I’ll be happy to help.

Cheers,

B

Advertisements

6 Responses to Application Approval Request Notification from Configuration Manager 2012 using Powershell

  1. Chris Cundy says:

    Hi, Is it possible to get hold of this Powershell script? So we can attempt to set this up in our environment?

  2. CMI says:

    Hello Bert,

    May you share with me your Powershell script to get an approval request emailed to us?

    This is very much appreciated.

    Carlos

    • Bert Pinoy says:

      Hi,

      The script can be downloaded here: http://1drv.ms/1k1OphE
      Keep in mind that some variables need to be edited:
      – $wmi = Get-WmiObject -ComputerName “servername” -Namespace “root\sms\site_XXX” -Class SMS_UserApplicationRequest
      – $SendMailTo = “IT ”
      – $SendMailFrom = “CONFIGMGR ”
      – $SMTPServer = “server.contoso.com”

      Best regards,

      Bert

      • Carlos Ingravera says:

        Hello Bert, | | This email has been sent from a virus-free computer protected by Avast. http://www.avast.com |

        Thank you very much. Your site is full of expertise, well written and concise explanations. I look forward to learning much from you Gents. Merry Christmas and Happy New Year. Regards, Carlos From: System Center Solutions To: cmi5424@yahoo.com Sent: Wednesday, December 16, 2015 3:30 AM Subject: [New comment] Application Approval Request Notification from Configuration Manager 2012 using Powershell #yiv4938517303 a:hover {color:red;}#yiv4938517303 a {text-decoration:none;color:#0088cc;}#yiv4938517303 a.yiv4938517303primaryactionlink:link, #yiv4938517303 a.yiv4938517303primaryactionlink:visited {background-color:#2585B2;color:#fff;}#yiv4938517303 a.yiv4938517303primaryactionlink:hover, #yiv4938517303 a.yiv4938517303primaryactionlink:active {background-color:#11729E;color:#fff;}#yiv4938517303 WordPress.com Bert Pinoy commented: “Hi, The script can be downloaded here: http://1drv.ms/1k1OphEKeep in mind that some variables need to be edited: – $wmi = Get-WmiObject -ComputerName “servername” -Namespace “root\sms\site_XXX” -Class SMS_UserApplicationRequest- $SendMailTo = “IT “-” | |

  3. CMI says:

    Hello Bert,

    Is it possible to share with me your PowerShell script? I too would like to set this up in our environment.

    Much Appreciated.

    CMI

    • Bert Pinoy says:

      Hi,

      The script can be downloaded here: http://1drv.ms/1k1OphE
      Keep in mind that some variables need to be edited:
      – $wmi = Get-WmiObject -ComputerName “servername” -Namespace “root\sms\site_XXX” -Class SMS_UserApplicationRequest
      – $SendMailTo = “IT ”
      – $SendMailFrom = “CONFIGMGR ”
      – $SMTPServer = “server.contoso.com”

      Best regards,

      Bert

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s