Home Powershell

Change support group in template

Roman_NepomniashchiiRoman_Nepomniashchii Customer IT Monkey ✭
Hi Team! I need in SCSM template(ServiceRequest or Incident) set support group by powershell.

import-module 'C:\Program Files\Microsoft System Center 2012 R2\Service Manager\Powershell\System.Center.Service.Manager.psd1'
$tmp = Get-SCSMObjectTemplate -DisplayName "Infopulse Request Digital Content"
$tmp.PropertyCollection 

But I don't have property "support group". In this script I have  $tmp.PropertyCollection how I can work with this collection? I think I must  work with SCSMProjection, who know how I can make this?

Answers

  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Support is just an enum
    Just use its ID
    $tierqueue = "XX.XX.XX"
    You can use entity explorer to find the Enum ID https://gallery.technet.microsoft.com/SCSM-Entity-Explorer-68b86bd2

  • Roman_NepomniashchiiRoman_Nepomniashchii Customer IT Monkey ✭
    Support is just an enum
    Just use its ID
    $tierqueue = "XX.XX.XX"
    You can use entity explorer to find the Enum ID https://gallery.technet.microsoft.com/SCSM-Entity-Explorer-68b86bd2

    Template don't have property support group! I can't set support group in template as usually.
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭

    $tmp = Get-SCSMObjectTemplate -DisplayName "Infopulse Request Digital Content"

    Is this ObjectTemplate a incident/service request class or custom class?
  • Roman_NepomniashchiiRoman_Nepomniashchii Customer IT Monkey ✭

    $tmp = Get-SCSMObjectTemplate -DisplayName "Infopulse Request Digital Content"

    Is this ObjectTemplate a incident/service request class or custom class?
    This is ObjectTemplate service request but it don't have property support group(((
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    The Service Request Class has Support Group as a property (Entity Explorer is great for reviewing this configurations)
    Here you can see the SR class and all the properties with the names needed for PowerShell

    So Then you can see the Enumerations on the enumerations tab


    Take the value from the Name Filed and place in the PowerShell
    $ServiceRequestSupportGroup= "Enum.SRSG.XXXXX"
    And now you can apply to your Work Item
    Then you can add it to your hash table

        #Create a hash table of the Service Request Arguments
         $serviceRequestHashTable = @{
             Title = $serviceRequestTitle;
             Description = $serviceRequestDescription;
             Urgency = $serviceRequestUrgency;
             Priority = $serviceRequestPriority;
             Area = $serviceRequestArea;
             Source = $serviceRequestSource;
             SupportGroup = $ServiceRequestSupportGroup;
             ID = “SR{0}”;
            }

    HTH
  • Roman_NepomniashchiiRoman_Nepomniashchii Customer IT Monkey ✭
    The Service Request Class has Support Group as a property (Entity Explorer is great for reviewing this configurations)
    Here you can see the SR class and all the properties with the names needed for PowerShell

    So Then you can see the Enumerations on the enumerations tab


    Take the value from the Name Filed and place in the PowerShell
    $ServiceRequestSupportGroup= "Enum.SRSG.XXXXX"
    And now you can apply to your Work Item
    Then you can add it to your hash table

        #Create a hash table of the Service Request Arguments
         $serviceRequestHashTable = @{
             Title = $serviceRequestTitle;
             Description = $serviceRequestDescription;
             Urgency = $serviceRequestUrgency;
             Priority = $serviceRequestPriority;
             Area = $serviceRequestArea;
             Source = $serviceRequestSource;
             SupportGroup = $ServiceRequestSupportGroup;
             ID = “SR{0}”;
            }

    HTH
    This I know. But I need set support group in template service request. As set support group in service request I know. My RO and Template store in MP when I transfer this MP between environment support groups in DEV in Test in Prod have other ID and after transfer field support group is empty. We look in commandlet set-scsmobjecttemplate in C# as we understood this is imposible
Sign In or Register to comment.