Public/Objects/Get-ABObject.ps1
function Get-ABObject { [CmdletBinding()] param( [int]$ObjectId ) begin { } process { $Path = Get-ABPath -Path "GetObject" -PathParameters @{id = $ObjectId } [System.UriBuilder]$Uri = "$($_ABSession.Uri)$Path" $HttpQSCollection = [System.Web.HttpUtility]::ParseQueryString([String]::Empty) $uri.Query = $HttpQSCollection.ToString() Write-Verbose $Uri.Uri.OriginalString Invoke-ABRestMethod -Uri $Uri.Uri.OriginalString -method "GET" } end { } } |