function Get-L2Domain { [CmdletBinding(DefaultParameterSetName="ByID")] [OutputType([PS.IPAM.Domain])] param ( [parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="ByID")] [ValidateNotNullOrEmpty()] [int] $Id ) process { $_params = @{ Controller = [PS.IPAM.controllers]::l2domains Method = "GET" Type = [PS.IPAM.types]::Domain } $_identifiers = @($Id) $_params.Add("Identifiers",$_identifiers) Invoke-Request @_params } } Export-ModuleMember -Function Get-L2Domain