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