Fixes, added session class
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
function Get-L2Domain {
|
||||
[CmdletBinding(DefaultParameterSetName="NoParams")]
|
||||
[CmdletBinding(DefaultParameterSetName="ByID")]
|
||||
[OutputType([PS.IPAM.Domain])]
|
||||
param (
|
||||
[parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="ByID")]
|
||||
[ValidateScript({ $_ -match "^\d+$" })]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[int]
|
||||
$Id
|
||||
@@ -11,16 +10,11 @@ function Get-L2Domain {
|
||||
process {
|
||||
$_params = @{
|
||||
Controller = [PS.IPAM.controllers]::l2domains
|
||||
Method = [PS.IPAM.methods]::GET
|
||||
Method = "GET"
|
||||
Type = [PS.IPAM.types]::Domain
|
||||
}
|
||||
|
||||
switch ($PSCmdlet.ParameterSetName) {
|
||||
"ByID" {
|
||||
$_identifiers = @($Id)
|
||||
}
|
||||
}
|
||||
|
||||
$_identifiers = @($Id)
|
||||
$_params.Add("Identifiers",$_identifiers)
|
||||
|
||||
Invoke-Request @_params
|
||||
|
||||
Reference in New Issue
Block a user