Public/Companies/Get-Pax8CompanyById.ps1
function Get-Pax8CompanyById { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateScript({ try { [System.Guid]::Parse($_) | Out-Null; $true } catch { $PSCmdlet.ThrowterminatingError($_) } })] [string]$companyId ) $endPoint = "companies/$($companyId)" Invoke-Pax8GetRequest -Arguments $PSBoundParameters -EndPoint $endPoint } |