Files
ps.ipam/functions/public/Get-L2Domain.ps1
2022-12-14 15:26:43 +03:00

29 lines
756 B
PowerShell

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