Home Community Uploads
image

Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.

DISCLAIMER

All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.

Cireson does not and will not support or maintain these enhancements, extensions, and scripts.

For Team Cireson uploads click here.

An SMlets based Exchange Connector

135678

Comments

  • Ben_McGarryBen_McGarry Customer IT Monkey ✭
    @Adam_Dzyacky.  Just want to say thanks for your very prompt response, December 2018, and apologies for my less than prompt reply. 

    The core script you provided really helped me troubleshoot.  It turned out the main issue I had was due to my own misunderstanding of how the mailbox is used in "windows" mode.  I continued to try using the mailbox I named in the script which was not owned by the account under which the scheduled task was running.  That will lead on to another question which I will ask at a later date if I still have other issues.  Many thanks again and to all other who contribute.  This connector has really saved us a pile of grief and is "the business".  Ben  
  • SBarterSBarter Member IT Monkey ✭
    I recently started using this connector after dealing with some issues with the native connector. Thanks to Adam for starting this great project.

    Question: What would be the best way to accomplish this --

    I would like to have IR's created from a monitoring software that send emails alerts. For example, if an email is received indicating a drive on a server has reached 90% capacity, I would like to automatically create an IR and apply a template.

    Based on different keywords in the email, maybe I could apply different templates.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    I knew I forgot to publish an article on this, so thanks for reminding me @SBarter and welcome! But no point in making you wait. Here's a few ways you can go about this right now:

    1. If you're using multiple inboxes for SCSM, you could send these alerts to a different mailbox and use the Multi-Mailbox feature as it applies unique templates per inbox on Create.
    2. You could use the Custom Actions PowerShell script and build logic within the Invoke-AfterCreateIR function to parse out information based on keywords, regex matching, etc and then apply a Template/update properties on the Incident.
    3. You could build a "Diagnosis" style Orchestrator runbook, attach that to your Default Email Template the connector uses, and perform the aforementioned keyword/regex matching thereby enabling automation through a native System Center component.

    In this particular use case, I'd choose SCOM and the SCOM Alert Connector above all of them. But if email is truly the only option as it sounds like this is an external monitoring system, then I think any of these 3 are viable options.
  • SBarterSBarter Member IT Monkey ✭
    Thank you for the ideas, Adam. The Custom Events script sounds like the best way to go. This will be a good chance for me to get familiar with SMLets.

  • Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
    Hi.
    Great work on the connector!

    Would it be possible to get mailbox redirection working for a mailbox with multiple smtp adresses?
    Would eliminate the need to have a mailbox for each forward.
    the information should be retrivable from the "TO" field in the header.

  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    The way the script is written, it shouldn't know the difference.  I have not tested this, but it should work.  That feature just reads the TO/CC fields until it finds a match.  What you describe here should still result in a match, which will tell the script to use a particular template.
  • Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
    Thanks Tom.
    did a test today but didnt manage to get it working.
    Will do a deepdive tomorrow.
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Ok, let me know what you run into.  We have been talking about putting aliases on one mailbox too, so I am interested in getting it to work.
  • Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
    Cant seem to get it working with 
    I have configured it like this
    $UseMailboxRedirection = $true
    $Mailboxes = @{
        "sysapp@skovde.se" = @{"DefaultWiType"="ir";"IRTemplate"="14d40c80-b798-4396-74a0-21a38eb91601";"SRTemplate"="My SR Template";"PRTemplate"="My PR Template";"CRTemplate"="My CR Template"};
    }
    but it still creates he ticket with the default ir template.

    Im using ID of the template since i cant get it to work with displayname.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Two years.
    150+ commits.
    Let's start 2019 with SMLets Exchange Connector v1.5!

    Custom Work Item Prefixes: Using different Work Item prefixes than the stock IR, SR, PR, CR, etc? Whatever you've set them as, the connector now honors the most core of SCSM customizations.

    Control Related Comments: The most classic of Exchange Connector "bugs". When a user who isn't the Affected or Assigned To it leaves a Comment it's left as a Null Analyst Comment. Now instead of digging through the Connector's PowerShell to change these values, they've been brought up into central configuration for easier modification. If you are considering changing these values, make sure you read the aforementioned link first.

    Support for Azure AI Score Class Extensions: Using Azure Cognitive Services is one thing, but leveraging the Sentiment Scoring outside of the initial email creation in your own unique way could lead to some interesting possibilities. That's why the latest version of the connector now supports writing these returned scores from Azure to your own custom Decimal class extensions so you can further report or automate against them.

    Dynamic Work Item Analyst Assignment: Analysts not picking up new Work Items? Trying to make sure things get assigned before everyone heads out to lunch? Attempting to lower your average Time to Resolution/Completion, or maybe you're @Silas_Sulser who originally indirectly raised this - the one thing that the SMlets Exchange Connector can now do is assign New Work Items out to Analysts within the Default Template's Support Group.
    • Completely Random Assignment = Get all the Analysts in the Support Group and randomly assign out
    • Lowest Assigned Work Item volume = Get all the Analysts in the Support Group, evaluate their currently assigned Work Items and assigns to the one with the least amount open Work Items.
    • Completely Random Assignment with Exchange Out of Office = Assigning Work Items out doesn't do much good if the Analyst that got Assigned to is Out of Office. Fortunately you can leverage my latest GitHub solution for core Service Manager with SCSMOutOfOffice and prevent Work Item assignment when people are out of office. In doing so, the SMlets Exchange Connector will randomly assign Work Items out as long as the Analyst has not set their out of office.
    • Lowest Work Item volume with Exchange Out of Office = Evaluate Analyst's currently assigned work item volume and assign as long as they aren't out of office using the SCSM Out of Office mp. If they are, move onto the next.
    Intelligent Work Item Decisioning, Routing and Classification with Azure Machine Learning: Today we take the SCSM Data Warehouse beyond reporting. Utilizing the power of Azure Machine Learning, the connector now supports integration to Azure ML to determine if the email should become an Incident or Service Request, the Classification of that item, and finally its Support Group. Using the provided walkthrough and sample data warehouse queries included on the Wiki, you can perform an extract/upload from your DW to Microsoft and train AML on your Work Item data specific to your organization. Once trained, the connector will submit new emails to Azure in order to perform initial Work Item triage using configurable minimum confidence levels to set these fields. (e.g. Minimum Support Group Confidence must be greater than 95%). And again - tailored entirely to you, your organization and your data. This new AML integration is compatible with continued use for Azure Cognitive Services for Priority Scoring and the above new Dynamic Assignment feature...although this speaks to a future where those could be predicted as well.

    This feature requires an Azure subscription along with a deployed instance of Azure Machine Learning Studio. It may incur monthly costs depending on usage. Please ensure you understand the potential financial costs to your organization before enabling this feature. Here's how to find information on pricing and how you can test the service out for free via the web.


    My thanks go out to @Tom_Hendricks and @Justin_Workman on this release for reviewing, raising bugs, and addressing them. You guys rock!


    The introduction of Azure Machine Learning to the connector is without question the most advanced feature to date for the SMLets Exchange Connector. Apart from its listed use above, you also stand to gain improved reporting and shining a light on your less used classifications. All of this now realized through PowerShell, Azure, and the CMDB that today wakes up - your Service Manager deployment.
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    @Magnus_Lundgren1 the IRTemplate property should be set to the DisplayName of the template, not the GUID.  Change it to the displayname (in the default language if you are supporting more than one) and it should work.
  • Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
    @Tom_Hendricks
    For some reason i cant use -Displayname i get an error "cannot find null template" something.
    I changed the get-scsmobjecttemplate to
        $defaultIRTemplate = Get-SCSMObjectTemplate -ID $DefaultIRTemplateName @scsmMGMTParams | where-object {$_.ID -eq "$DefaultIRTemplateName"}

    ID works fine for creating the workitem, its just not creating it with the correct template for when i send to the secondary SMTP adress.
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    @Magnus_Lundgren1 I was referring to the mailbox hashtable.  You do not need to change $defaultIRTemplate.  Let's go back to the mailbox hashtable:

    $Mailboxes =&nbsp;<a rel="nofollow" href="https://community.cireson.com/profile/%7B">@{</a><div>&nbsp; &nbsp; "sysapp@skovde.se" =&nbsp;<a rel="nofollow" href="https://community.cireson.com/profile/%7B%22DefaultWiType%22%3D%22ir%22" title="Link: https://community.cireson.com/profile/%7B%22DefaultWiType%22%3D%22ir%22">@{"DefaultWiType"="ir"</a>;"IRTemplate"="<b>THE NAME OF MY TEMPLATE</b>";"SRTemplate"="My SR Template";"PRTemplate"="My PR Template";"CRTemplate"="My CR Template"};</div><div>}</div>
    If the DisplayName of your template is "THE NAME OF MY TEMPLATE" then the above code example would work for you.  In an attempt to keep configuration reasonably simple, this hashtable is meant for you to provide the name here, rather than passing in an object.  Further down in the script, it will look up your template by its displayname.  You do not have to do this.
  • Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
    @Tom_Hendricks
    Yes i get that.
    But as i said when i run Get-SCSMObjectTemplate -DisplayName "The name of the template" i get
    Get-SCSMObjectTemplate : Value cannot be null.
    Parameter name: input

    I have tried -ComputerName and verified that im typing the correct displayname of the template.
    -ID is working

    I have replaced all Get-SCSMObjectTemplate -displayname with -ID in the entire script and where-object {$_.ID -eq "$DefaultIRTemplateName"}
    Shouldnt make any difference if i get the template with the guid or the displayname?
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    @Magnus_Lundgren1 It definitely does make a difference.  You need to provide a displayname, because later in the script the template will be obtained by matching whatever you type here to the displayname.

    However, something else seems to be happening here.  For example:
    • If you run Get-ScsmObjectTemplate -DisplayName "The Wrong Template Name That Will Not Match Anything" nothing will be returned, but no exception will occur either.
    • If you run Get-ScsmObjectTemplate -DisplayName "" (an empty string) then you will get all templates back at once.
    • The only way to make that error occur is Get-ScsmObjectTemplate -DisplayName $null or something equivalent.  In other words, you are apparently not sending a name over at all, so you should check your variable name that you are passing in, or whatever line of code is assigning a value to it.
    Feel free to PM me if you are still having trouble.  We can log an issue if there is something going on here with the script.
  • Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
    Im strugling with an error.
    when users send in comments to SRs the comment isnt added to the workitem. works for IR.
    Tried to run it manually but im getting this when it tries to create the user comment

    New-SCSMObjectProjection : EndUserCommentLog
    At line:1955 char:43
    +         "System.WorkItem.ServiceRequest" {New-SCSMObjectProjection -Type "System ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (EndUserCommentLog:String) [New-SCSMObjectProjection], ObjectNotFoundException
        + FullyQualifiedErrorId : Alias not found on projection,SMLets.NewSCSMObjectProjectionCommand
     
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited May 2019
    Looks like this came down to a potential issue with similarly named Type Projections. Fortunately it's something that we can address. Issue and workaround has been raised over here.
  • Kenneth_McMichaelKenneth_McMichael Customer IT Monkey ✭

    I have been trying the new dynamic assignment feature presented in 1.5 but haven't gotten it to work yet. Tried both random and volume as variables but it just keeps the assignedTo blank. The default template used has a support group mapped to it and the cireson portal does recognize the users within the group.


    I am not getting any errors when the script runs. Has anyone else experienced this?

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭

    Raised and will investigate @Kenneth_McMichael

  • Brian_WinterBrian_Winter Customer Advanced IT Monkey ✭✭✭

    I've got a stupid question. I've downloaded 1.5 ZIP and now am looking for any Installation or Configuration documentation. Can you point me in the right direction?

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited August 2019

    Not a stupid question at all, if anything you've just given me an idea. But anyway, the Wiki on the repo covers a couple ways to setup.

    https://github.com/AdhocAdam/smletsexchangeconnector/wiki/Configuration-Examples

  • Brian_WinterBrian_Winter Customer Advanced IT Monkey ✭✭✭

    We found that there is an issue in the way our process Completes Manual Activities. We have several MAs that go to a group of people and one MA that is used as a placeholder while an external program runs and emails Complete to the placeholder MA (basically this stops the ticket from closing until the external program does it's thing. Long story short, we have lots of MAs with no Activity Implementer.

    How can we bypass the requirement that an inbound email to Complete the MA has to be from the Activity Implementer?

    I figured I'd ask before weeding through code.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited August 2019

    Bypass the requirement? Quite easily 😁

    Check out the following line for the Complete/MA logic.


    Certainly a scenario I never considered, but one that gives rise to an interesting path. If the person Completing is not the Implementer, then make them the Implementer when the Complete action takes place. Hrmmmm.

  • Brian_WinterBrian_Winter Customer Advanced IT Monkey ✭✭✭

    You read my mind and I was trying to find a way to fire a [take] command inside the If block.

    Anyway, the quick fix was surprisingly simple:

    1) created a var (on line 238): $BypassActivityImplementerRestriction = $true

    2) on line 1481 (was 1480), I changed to: if ((($activityImplementerSMTP.TargetAddress -eq $message.From) -or $BypassActivityImplementerRestriction) -and ($commentToAdd -match "\[$completedKeyword]"))

    3) did the same for the Skip, line 1489 (was 1488).

  • Brian_WinterBrian_Winter Customer Advanced IT Monkey ✭✭✭

    This may have been mentioned above, but I couldn't find it in the tread. I was able to use the Schedule Outlook Meeting in both Firefox and Chrome, but sadly fails for Edge and IE (IE wants to find an App to process DATA).

    Don't know if this is a bug or bad settings on my end. Thanks!

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭

    This looks like it's an issue around how the browsers choose to handle the Javascript that generates the ICS file on the fly that is different in IE/Edge than Chrome/Firefox. Raised over here.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited October 2019

    Today v1.6 arrives on GitHub!


    Azure Translate: When it comes to support, why should language be a barrier? Now with integration into the Azure Cognitive Services Translator API, you can now receive emails that create Incidents or Service Requests from your Affected Users in over 60 languages and have them automatically converted to a default language for your Analysts. But if you really want to close the loop, then it's time to set the Locale on all of your SCSM User CIs and to deploy the new complimentary SCSM Translate management pack. The practical upshot of which is that employees will be able to communicate in their native languages to one another through SCSM and have translation automatically performed for them via Azure through email, portal, or console.

    Enhancements: Azure Machine Learning predictions and scores can now be written to class extensions on Incidents and Service Requests so you can report, calibrate, and improve your training models.

    Translation services requires an Azure subscription along with a deployed instance of Azure Translate. It may incur monthly costs depending on usage. Please ensure you understand the potential financial costs to your organization before enabling this feature. Here's how to find information on pricing.


    Thanks go out to community members @Kenneth_McMichael , @Matt_Overton , and @Magnus_Lundgren1 for their attention to detail, reporting issues, and improvements to documentation.

    We're on the verge of the first major upgrade that will move the connector into v2.0 territory. It's an upgrade that's been in the works for sometime now as the connector's configuration will shift out of PowerShell and into a dedicated management pack with a fully fledged UI accessible via the SCSM Console's Administration Pane. Curious to see what it looks like? You can see for yourself with v2.0 Release Candidate 2.

  • Gerhard_GoossensGerhard_Goossens Customer Advanced IT Monkey ✭✭✭

    @Adam_Dzyacky

    This new GUI version is awesome. Well done.

    I have a question regarding closed SR's. I have a request from analysts to create a new IR if a user replies to an closed SR. This will mean to copy the title and description and relate the new IR and closed SR.

    They wanted to re open the SR, but I said that it is not alligned with ITILL best practices. So the proposed solution are knd of meeting them halfway.


    Regards

    G

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited September 2019

    @Gerhard_Goossens we have that feature currently, however it's not the exact implementation you're asking for. Through the $CreateNewWorkItemWhenClosed value (true/false), if an End User replies to a Incident or Service Request that's closed it will create a new IR/SR, copy the Title/Description over, and then relate the two Work Items together. But the short version is - Closed IR creates New IR. Closed SR creates New SR.

    You can see this in the Update-WorkItem function below.


    And also - thank you. 😁

  • Gabriel_LencesGabriel_Lences Customer Advanced IT Monkey ✭✭✭

    @Adam_Dzyacky I haven't read through all of the features of your exchange SMLets connector, but is a there way that if the connector would catch an analyst comment on an IR/SR that just arrived it would meet/ set the first response time, without needing to "acknowledge" the IR/SR?

    We did a large portal upgrade (a leap , I'd say) way back in the summer. Most of our analysts have been using the console before that and not everyone has yet adapted topressing "ackonwledge" each time they want to meet the First response SLA, so they just write a normal "analyst comment" to the ticket, but this is ignored by the SLA.

    Thanks!

    G.

Sign In or Register to comment.