If ($ParentID -like "CR*")
    {$Class = Get-SCSMClass -name System.WorkItem.ChangeRequest$}
ElseIf ($ParentID -like "SR*")
    {$Class = Get-SCSMClass -name System.WorkItem.ServiceRequest$}
Else {Write-Host "Bad Class - Script will fail"}