Hi @jansi rani krishnan ,
here we go:
Import-Module SMlets
$smdefaultserver = "SCSM1"
# Define properties
$irID = "IR2103"
$SysID = "c21f57971b6d7c101d777b75464bcb26"
$SNOWticketID = "INC0055836"
$status = "inserted"
######
$irClass = Get-SCSMclass -name System.Workitem.Incident$
# Get SCSM objects
$irObj = Get-SCSMObject -Class $irClass -Filter "ID -eq $irID"
# Update IR Alternate Contact Method
if (($status -eq "inserted") -and ($irObj)) {
$UpdateAlternateContact = "Sysid: $SysID | SNOW ticket number: $SNOWticketID | Correlation_id: $irID"
Set-SCSMObject -SMObject $irObj -Property "ContactMethod" -value $UpdateAlternateContact
}
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten