Public/Get-CAMRelatedObject.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
Function Get-CAMRelatedObject { <# .SYNOPSIS Function to retrieve the Related Object .DESCRIPTION Function to retrieve the Related Object .PARAMETER WorkItemObject Specifies the Object to process .EXAMPLE $HardwareAssetPCpro = Get-CamHardwareAsset -DisplayName "PCPro" Get-CAMRelatedObject -WorkItemObject $HardwareAssetPCpro This will retrieve all the related object to the Hardware Asset "PCPro" .EXAMPLE $SupportContract = Get-CAMSupportContract -DisplayName "Dell Servers 2016" Get-CAMRelatedObject -WorkItemObject $SupportContract This will retrieve all the related object to the Support Contract "Dell Servers 2016" .NOTES Francois-Xavier Cat www.lazywinadmin.com @lazywinadm github.com/lazywinadmin #> [CmdletBinding()] param ( [Parameter(ValueFromPipeline)] $WorkItemObject ) Get-SCSMRelatedObject -SMObject $WorkItemObject } |