Public/ObjectBuilder/Get-R1RelatedObject.ps1
|
# .ExternalHelp psRadiantOne-help.xml function Get-R1RelatedObject { [CmdletBinding()] [OutputType('psRadiantOne.RelatedObject')] param( [parameter( Mandatory = $true, ValueFromPipelineByPropertyName = $true )] [ValidateNotNullOrEmpty()] [string]$dn, [parameter( Mandatory = $true, ValueFromPipelineByPropertyName = $true )] [ValidateNotNullOrEmpty()] [string]$primaryObject, [parameter( Mandatory = $true, ValueFromPipelineByPropertyName = $true )] [ValidateLength(1, 500)] [string]$objectDn ) Begin { Assert-R1Session -RequireToken }#begin Process { $URI = Resolve-R1ServiceUrl -Service Namespace -Path "naming_contexts/$($dn | Get-EscapedString)/object_builder/primary_objects/$($primaryObject | Get-EscapedString)/objects/related_objects_full" $Body = @{ objectDn = $objectDn } | ConvertTo-R1JsonBody $Result = Invoke-R1RestMethod -Uri $URI -Method POST -Body $Body if ($null -ne $Result) { $Result | Add-CustomType -Type psRadiantOne.RelatedObject } }#process End { }#end } |