Quantcast
Channel: SCSM PowerShell Cmdlets
Viewing all articles
Browse latest Browse all 306

New Post: Trying to get the parent CR of a review activity...

$
0
0
Try this to see if it works for you.
$SCSMServer = "localhost"
$RA = "RA12345"
$ParentRequestRelationshipID = "2da498be-0485-b2b2-d520-6ebd1698e61b"
$ReviewActivity = Get-SCSMObject -Class (Get-SCSMClass -Name System.WorkItem.Activity.ReviewActivity$  -ComputerName $SCSMServer) -ComputerName $SCSMServer -Filter "ID -eq $RA"

$RelatedParentRequest = (Get-SCSMRelationshipObject -ComputerName $SCSMServer -ByTarget $ReviewActivity  | ?{$_.RelationshipID -eq $ParentRequestRelationshipID -and $_.IsDeleted -eq $False}) 
Ray

Viewing all articles
Browse latest Browse all 306

Trending Articles