locked
Sending unassigned incident RRS feed

  • Question

  • Hello,

    There is anyone who use this powershell script :

    $smtphost=”LUDSRV206″
    $to=”kurt@contoso.local”
    $from=”svc-wf-ludsrv204@contoso.local”
    
    function Send-Mail
    {
    param($From,$To,$Subject,$Body)
    $smtp = new-object system.net.mail.smtpClient($smtphost)
    $mail = new-object System.Net.Mail.MailMessage
    $mail.from= $From
    $mail.to.add($To)
    $mail.subject= $Subject
    $mail.body= $Body
    $mail.isbodyhtml=$true
    $smtp.send($mail)
    }
    
    Import-Module SMLets
    $BeforeDate = (get-date).AddHours(-2).ToString(“yyy-MM-dd HH:mm:ss”)
    $getIncidents = Get-SCSMIncident -Status “Active” -CreatedBefore $BeforeDate | where { $_.AssignedTo -eq $NULL } | select ID, Title, AffectedUser
    
    if ($getIncidents.count -gt 0) {
    
    $subject= “Unassigned incidents in Service Manager, total of ” + $getIncidents.count
    $body=$getIncidents|convertto-html
    Send-Mail $from $to $subject $body
    
    }
    
    Remove-Module SMLets

    Source here :

    http://gallery.technet.microsoft.com/SCSM-Mail-Notification-c217a8dc

    In my SCSM, it's doesn't work, and I don't know why ... I have "Error" in workflow... 

    Any help ? 

    thanks !

    Wednesday, July 10, 2013 6:18 PM

Answers

  • So I've been playing with this and in order to get it to work properly I had to change a few things.

    Aside from changing the SCSMClass Name, I also change the Get-Object command to this:

    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active -AND $_.TierQueue.Displayname -eq $DisplayNSupportGrp)})
    
    As you can see I removed the created variable, because I dont need it, I want all the unassigned incidents.  But the main part is changing $_.TierQueue -eq $TierQueue to $_.TierQueue.Displayname -eq $DisplayNSupportGrp.  This bypasses the Get-SCSMEnumeration command though...if you need that.

    My script now looks like:

    # Import SMlets module 
    Import-Module SMlets -force
     
    # Configure your mail server, the recipient and the sender of the mail 
    $smtphost=”mailserver.demo.local”  
    $to=”Administrator@demo.local”  
    $from=”Helpdesk@demo.local” 
    
    #Configure Support GroupTier Queue Friendly Name (Displayname) 
    $DisplayNSupportGrp = 'Support Group'
    
    # Send-Mail function 
    function Send-Mail 
    	{ 
    		param($From,$To,$Subject,$Body) 
    		$smtp = new-object system.net.mail.smtpClient($smtphost) 
    		$mail = new-object System.Net.Mail.MailMessage 
    		$mail.from= $From 
    		$mail.to.add($To) 
    		$mail.subject= $Subject 
    		$mail.body= $Body 
    		$mail.isbodyhtml=$true 
    		$smtp.send($mail) 
    	}
    	
    # Some other variables	
    $Active = Get-SCSMEnumeration IncidentStatusEnum.Active$
    $AssignedUserObjectRelClass = Get-SCSMRelationshipClass System.WorkItemAssignedToUser
    $IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident
    $Output = 'ID - Title <br>'
    $Counter = 0
    
    #Get all acitiv incidents from a tier Queue created xy minutes before
    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active -AND $_.TierQueue.Displayname -eq $DisplayNSupportGrp)})
    
    $Incidents.count
    
    If ($Incidents.count -gt 0)
    {
    
    #Get all unassigned incidents from list
    foreach ($Incident in $Incidents)
    	{
    	$AssignedUser = Get-SCSMRelatedObject -SMObject $Incident -Relationship $AssignedUserObjectRelClass 
    
    		If ($AssignedUser.Displayname -eq $NULL)
    			{
    				$AssignedUser
    				$Counter = $Counter + 1
    				$Output = $Output + "`r`n`r`n" + $Incident.ID + ' - ' + $Incident.Title + ' <br>'
    			}
    	}
    
    $Output
     
    # If there is any unassigned incident send a mail with a list of these incidents  
     if ($Counter -gt 0)  
        { $subject = “Unassigned incidents in Service Manager Support Group: “+ $DisplayNSupportGrp + “, total of ” + $Counter 
          $body = $Output 
     Send-Mail $from $to $subject $body 
    	}
    }	
    Remove-Module SMlets -force


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Friday, July 12, 2013 7:46 PM
  • I get that when I run it in a regular PS sessionl; when I run the script in the SCSM shell it runs fine though.  I'm working on that because I want to create a windows task to launch the script every morning.  I'll keep grinding away at it and let you know when/if I figure out whats wrong with that Get-SCSMObject command.

    Does it at least work when you run it in the SCSM shell?


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Monday, July 15, 2013 12:42 PM
  • I got it working, and unfortunately it was the $ that I told you to remove.  Apparently a normal PS session requires it and a SCSM shell session is confused by it.  I have no idea why.  To run the script via a task it should be:

    $IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident$

    I now have this working sending notifications for both Incidents as well as Service Requests (minor modifications).

    I don't know why you wouldn't be getting mail though; are you getting notifications sent from other subscriptions you created in the console? Is your smtphost correct in the script?  Did you change "$_.TierQueue" to "$_.TierQueue.Displayname"?


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Monday, July 15, 2013 1:37 PM
  • I copied your script, only changing my smtphost, emails, and name of support group.  I ran the script without changing anything else and it worked fine.

    When you run it in the SCSM shell does it output incidents?  You will not receive an email if it does not find any unassigned incidents for the support group.  Is the support group you're entering entered exactly like it is on your Incident Tier Queue List?


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Monday, July 15, 2013 4:18 PM
  • Now you are notifying on all active incidents rather than all active incidents in X support group.  If you don't care about a particular support group and this is being sent to a manager then that is fine.  I have this script running for each support group to let them know that they have tickets they need to assigned to an analyst. 

    Close to the top of the script you will see $DisplayNSupportGrp = 'Support Group'.  Support group is what you have defined in the Incident Tier Queue list.

    This is where you declare which Support Group to search in.  Each support group should have their tickets assigned to an individual analyst.  If the Assigned To field is empty, the support group should assigned the ticket to someone.  

    So I have this script running for all 9 of my support groups that are defined on the Incident Tier Queue list.  So I have 9 scripts with a different $DisplayNSupportGrp.  For example, for the screenshot I have $DisplayNSupportGrp = 'Null'.

    And the email is sent to that support groups distribution group address.  But if you just want to send it to a manager with all unassigned incidents, than the way you have it is fine.


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Tuesday, July 16, 2013 2:29 PM

All replies

  • In log I have this error 


    Thursday, July 11, 2013 7:54 AM
  • I try this solution 

    http://www.systemcenterservicemanager.co.uk/SCSM/service-manager-2012-sp1-rtm-workflow-powershell-fix/

    but when I put the code and restart service, my workflow doesn't execute anymore; 

    Thursday, July 11, 2013 8:01 AM
  • Ok workflow execute now, this is my code into monitoringhost.. 

    Still same error with this code..

    Thursday, July 11, 2013 8:08 AM
  • I find same error in this post but no solution

    A module of type “Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation.WorkflowFoundationWriteActionModule” reported an exception
    Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation.InvalidWorkflowAssemblyNameException: The value ‘CreateNewVM’ specified for the workflow assembly is invalid. See inner exception for
    
    information. —>System.IO.FileNotFoundException: Could not load file or assembly ‘CreateNewVM’ or one of its dependencies. The system cannot find the file specified.
    File name: ‘CreateNewVM’
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
    
    forIntrospection)
       at System.Reflection.Assembly.internalLoad(AssemblyName assemblyRef, Evidence assemblySecurity,StackCrawlMark& stackMark,Boolean forIntrospection)
       at System.Reflection.Assembly.internalLoad(String assemblyString, Evidence assemblySecurity,StackCrawlMark& stackMark,Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation.WorkflowFoundationModuleUtility.DeserializeWorkflowAssembly(String assemblyString)
    
    WRN: Assembly binding logging is turned OFF.
    To enable assesmbly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog](DWORD) to 1.
    Note: There is some performance menalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software/Microsoft\Fusion!EnableLog]l
    
       —End of inner exception stack trace—
       at Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation.WorkflowFoundationModuleUtility.ThrowInvalidWorkflowAssemblyNameException(Exception innerException, String assemblyName)
       at Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation.WorkflowFoundationModuleUtility.DeserializeWorkflowAssembly(String assemblyString)
       at Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation.BinaryWorkflowModuleConfiguration.DeserializeModuleConfiguration()
       at Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation.WorkflowFoundationWriteActionModule.ProcessNewDataItems(InputStreamStorage`1 storage) which was running as part of rule
    “Microsoft.SystemCenter.WorkflowFoundationTask” running for instance “Microsoft.SystemCenter.WorkflowFoundation.WorkflowTarget” with id:”{351A1225-D3A6-152B-5CA5B54232F6}” in management group “SODSM00″.

    source : http://www.systemcentercentral.com/forums-archive/topic/error-code-2130771918-about-workflow/

    Thursday, July 11, 2013 8:14 AM
  • Did you install the SMLets from Codeplex?

    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Friday, July 12, 2013 8:16 AM
    • Unmarked as answer by nanou42 Friday, July 12, 2013 8:16 AM
    Friday, July 12, 2013 1:20 AM
  • Hello Pete,

    Yes, I have the latest version of SMLets 

    Friday, July 12, 2013 8:17 AM
  • The problem is probably that you've change the script to use Get-SCSMIncidents rather than the Get-SCSMObject cmdlets that Andreas declares in his script. It wouldn't matter except you are looking for the date created variable which does not exist at the Incident class level but rather the workitem class level.  This is why he called it out like:

    $IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident$
    Get-SCSMObject -Class $IncidentClass


    - Get on the floor, do that dinosaur


    • Edited by Pete Barbuto Friday, July 12, 2013 12:14 PM typo
    Friday, July 12, 2013 12:13 PM
  • In fact, I want to use his script, 

    # Import SMlets module  
    Import-Module SMlets -force 
      
    # Configure your mail server, the recipient and the sender of the mail  
    # $smtphost=””  
    # $to=””  
    # $from=””  
     
    $smtphost=”mailserver.demo.local”  
    $to=”Administrator@demo.local”  
    $from=”Helpdesk@demo.local”  
     
    # Configure time value Incident is created before xy minutes   
    $CreatedBefore = 120 
    #Configure Support GroupTier Queue Friendly Name (Displayname) 
    $DisplayNSupportGrp = 'Tier 1' 
     
    # Send-Mail function  
    function Send-Mail  
        {  
            param($From,$To,$Subject,$Body)  
            $smtp = new-object system.net.mail.smtpClient($smtphost)  
            $mail = new-object System.Net.Mail.MailMessage  
            $mail.from= $From  
            $mail.to.add($To)  
            $mail.subject= $Subject  
            $mail.body= $Body  
            $mail.isbodyhtml=$true  
            $smtp.send($mail)  
        } 
         
    # Some other variables     
    $TierQueue = Get-SCSMEnumeration|?{$_.DisplayName -eq $DisplayNSupportGrp} 
    $BeforeDate = (get-date).AddMinutes(-$CreatedBefore).ToString("MM/dd/yyy HH:mm:ss") 
    $Active = Get-SCSMEnumeration IncidentStatusEnum.Active$ 
    $TierDisplayname = $TierQueue.Displayname 
    $TierDisplayname 
    $AssignedUserObjectRelClass = Get-SCSMRelationshipClass System.WorkItemAssignedToUser 
    $IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident$ 
    $Output = 'ID - Title <br>' 
    $Counter = 0 
     
    #Get all acitiv incidents from a tier Queue created xy minutes before 
    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active -AND $_.TierQueue -eq $TierQueue -AND ($_.CreatedDate) -lt $BeforeDate)}) 
     
    $Incidents.count 
     
    If ($Incidents.count -gt 0) 
    { 
     
    #Get all unassigned incidents from list 
    foreach ($Incident in $Incidents) 
        { 
        $AssignedUser = Get-SCSMRelatedObject -SMObject $Incident -Relationship $AssignedUserObjectRelClass  
     
            If ($AssignedUser.Displayname -eq $NULL) 
                { 
                    $AssignedUser 
                    $Counter = $Counter + 1 
                    $Output = $Output + "`r`n`r`n" + $Incident.ID + ' - ' + $Incident.Title + ' <br>' 
                } 
        } 
     
    $Output 
      
    # If there is any unassigned incident send a mail with a list of these incidents  
     if ($Counter -gt 0)  
        { $subject = “Unassigned incidents in Service Manager Support Group: “+ $TierQueue.Displayname + “, total of ” + $Counter 
          $body = $Output 
     Send-Mail $from $to $subject $body  
        } 
    }     
    Remove-Module SMlets -force

    but when I test I have :

    Approximative translate : "Can not bind argument to parameter "class" because he's null


    • Edited by nanou42 Monday, July 15, 2013 6:58 AM error
    Friday, July 12, 2013 2:17 PM
  • Where Get-SCSMClass -Name System.WorkItem.Incident$

    Remove the $ so that it is Get-SCSMClass -Name System.WorkItem.Incident


    - Get on the floor, do that dinosaur

    Friday, July 12, 2013 3:39 PM
  • So I've been playing with this and in order to get it to work properly I had to change a few things.

    Aside from changing the SCSMClass Name, I also change the Get-Object command to this:

    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active -AND $_.TierQueue.Displayname -eq $DisplayNSupportGrp)})
    
    As you can see I removed the created variable, because I dont need it, I want all the unassigned incidents.  But the main part is changing $_.TierQueue -eq $TierQueue to $_.TierQueue.Displayname -eq $DisplayNSupportGrp.  This bypasses the Get-SCSMEnumeration command though...if you need that.

    My script now looks like:

    # Import SMlets module 
    Import-Module SMlets -force
     
    # Configure your mail server, the recipient and the sender of the mail 
    $smtphost=”mailserver.demo.local”  
    $to=”Administrator@demo.local”  
    $from=”Helpdesk@demo.local” 
    
    #Configure Support GroupTier Queue Friendly Name (Displayname) 
    $DisplayNSupportGrp = 'Support Group'
    
    # Send-Mail function 
    function Send-Mail 
    	{ 
    		param($From,$To,$Subject,$Body) 
    		$smtp = new-object system.net.mail.smtpClient($smtphost) 
    		$mail = new-object System.Net.Mail.MailMessage 
    		$mail.from= $From 
    		$mail.to.add($To) 
    		$mail.subject= $Subject 
    		$mail.body= $Body 
    		$mail.isbodyhtml=$true 
    		$smtp.send($mail) 
    	}
    	
    # Some other variables	
    $Active = Get-SCSMEnumeration IncidentStatusEnum.Active$
    $AssignedUserObjectRelClass = Get-SCSMRelationshipClass System.WorkItemAssignedToUser
    $IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident
    $Output = 'ID - Title <br>'
    $Counter = 0
    
    #Get all acitiv incidents from a tier Queue created xy minutes before
    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active -AND $_.TierQueue.Displayname -eq $DisplayNSupportGrp)})
    
    $Incidents.count
    
    If ($Incidents.count -gt 0)
    {
    
    #Get all unassigned incidents from list
    foreach ($Incident in $Incidents)
    	{
    	$AssignedUser = Get-SCSMRelatedObject -SMObject $Incident -Relationship $AssignedUserObjectRelClass 
    
    		If ($AssignedUser.Displayname -eq $NULL)
    			{
    				$AssignedUser
    				$Counter = $Counter + 1
    				$Output = $Output + "`r`n`r`n" + $Incident.ID + ' - ' + $Incident.Title + ' <br>'
    			}
    	}
    
    $Output
     
    # If there is any unassigned incident send a mail with a list of these incidents  
     if ($Counter -gt 0)  
        { $subject = “Unassigned incidents in Service Manager Support Group: “+ $DisplayNSupportGrp + “, total of ” + $Counter 
          $body = $Output 
     Send-Mail $from $to $subject $body 
    	}
    }	
    Remove-Module SMlets -force


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Friday, July 12, 2013 7:46 PM
  • Hello Pete, really thanks you for your investment!!

    I have following error, i don't know why :( :

    "

    InvalidArgument: (:) [Get-SCSMObject], Parameter 
       BindingException
        + FullyQualifiedErrorId : CannotConvertArgument,SMLets.GetSMObjectCommand
     
    0"
    Monday, July 15, 2013 8:39 AM
  • I get that when I run it in a regular PS sessionl; when I run the script in the SCSM shell it runs fine though.  I'm working on that because I want to create a windows task to launch the script every morning.  I'll keep grinding away at it and let you know when/if I figure out whats wrong with that Get-SCSMObject command.

    Does it at least work when you run it in the SCSM shell?


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Monday, July 15, 2013 12:42 PM
  • I want exactly the same thing, a windows task would be perfect, but it does not work now

    I create a workflow to try with this script in SCSM :

    It's ok, succes for this workflow but no email in my inbox :s 

    When I execute this script in Service Manager Shell no error but no email too.. 

    • Edited by nanou42 Monday, July 15, 2013 1:33 PM add
    Monday, July 15, 2013 1:14 PM
  • I got it working, and unfortunately it was the $ that I told you to remove.  Apparently a normal PS session requires it and a SCSM shell session is confused by it.  I have no idea why.  To run the script via a task it should be:

    $IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident$

    I now have this working sending notifications for both Incidents as well as Service Requests (minor modifications).

    I don't know why you wouldn't be getting mail though; are you getting notifications sent from other subscriptions you created in the console? Is your smtphost correct in the script?  Did you change "$_.TierQueue" to "$_.TierQueue.Displayname"?


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Monday, July 15, 2013 1:37 PM
  • # Import SMlets module 
    Import-Module SMlets -force
     
    # Configure your mail server, the recipient and the sender of the mail 
    $smtphost="" 
    $to=""  
    $from=""
    
    #Configure Support GroupTier Queue Friendly Name (Displayname) 
    $DisplayNSupportGrp = 'Support Group'
    
    # Send-Mail function 
    function Send-Mail 
     { 
      param($From,$To,$Subject,$Body) 
      $smtp = new-object system.net.mail.smtpClient($smtphost) 
      $mail = new-object System.Net.Mail.MailMessage 
      $mail.from= $From 
      $mail.to.add($To) 
      $mail.subject= $Subject 
      $mail.body= $Body 
      $mail.isbodyhtml=$true 
      $smtp.send($mail) 
     }
     
    # Some other variables 
    $Active = Get-SCSMEnumeration IncidentStatusEnum.Active$
    $AssignedUserObjectRelClass = Get-SCSMRelationshipClass System.WorkItemAssignedToUser
    $IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident
    $Output = 'ID - Title <br>'
    $Counter = 0
    
    #Get all acitiv incidents from a tier Queue created xy minutes before
    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active -AND $_.TierQueue.Displayname -eq $DisplayNSupportGrp)})
    
    $Incidents.count
    
    If ($Incidents.count -gt 0)
    {
    #Get all unassigned incidents from list
    foreach ($Incident in $Incidents)
     {
     $AssignedUser = Get-SCSMRelatedObject -SMObject $Incident -Relationship $AssignedUserObjectRelClass 
    
      If ($AssignedUser.Displayname -eq $NULL)
       {
        $AssignedUser
        $Counter = $Counter + 1
        $Output = $Output + "`r`n`r`n" + $Incident.ID + ' - ' + $Incident.Title + ' <br>'
       }
     }
    
    $Output
     
    # If there is any unassigned incident send a mail with a list of these incidents  
     if ($Counter -gt 0)  
        { $subject = "Unassigned incidents in Service Manager Support Group: "+ $DisplayNSupportGrp + ", total of " + $Counter 
          $body = $Output 
     Send-Mail $from $to $subject $body 
     }
    } 
    Remove-Module SMlets -force

    I use this script.

    My other subscription works properly (I'm sure about my smtphost) and I change everything you told me.. :s   

    Monday, July 15, 2013 2:56 PM
  • I copied your script, only changing my smtphost, emails, and name of support group.  I ran the script without changing anything else and it worked fine.

    When you run it in the SCSM shell does it output incidents?  You will not receive an email if it does not find any unassigned incidents for the support group.  Is the support group you're entering entered exactly like it is on your Incident Tier Queue List?


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Monday, July 15, 2013 4:18 PM
  • I think you are right because I have nothing when I execute script in Service Manager shell ! Like if script doesn't find anything. 

    You talk about this variable : "$DisplayNSupportGrp" ??

    In fact, I don't understand this variable ... What is it ? I  think It correspond to that : support group in my console ? so my variable is equal to = 'Niveau 1'  ?? 

    Sorry if I am totaly wrong :( thanks again for your help :) 


    Tuesday, July 16, 2013 7:21 AM
  • Ok, In this line :

    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active -AND $_.TierQueue.Displayname -eq $DisplayNSupportGrp)})

    I just put : 

    $Incidents = @(Get-SCSMObject -Class $IncidentClass | where {($_.Status -eq $Active )})

    And It's works :) 


    Tuesday, July 16, 2013 7:31 AM
  • Now you are notifying on all active incidents rather than all active incidents in X support group.  If you don't care about a particular support group and this is being sent to a manager then that is fine.  I have this script running for each support group to let them know that they have tickets they need to assigned to an analyst. 

    Close to the top of the script you will see $DisplayNSupportGrp = 'Support Group'.  Support group is what you have defined in the Incident Tier Queue list.

    This is where you declare which Support Group to search in.  Each support group should have their tickets assigned to an individual analyst.  If the Assigned To field is empty, the support group should assigned the ticket to someone.  

    So I have this script running for all 9 of my support groups that are defined on the Incident Tier Queue list.  So I have 9 scripts with a different $DisplayNSupportGrp.  For example, for the screenshot I have $DisplayNSupportGrp = 'Null'.

    And the email is sent to that support groups distribution group address.  But if you just want to send it to a manager with all unassigned incidents, than the way you have it is fine.


    - Get on the floor, do that dinosaur

    • Marked as answer by nanou42 Wednesday, July 17, 2013 7:38 AM
    Tuesday, July 16, 2013 2:29 PM