Fixes, added session class
This commit is contained in:
@@ -7,9 +7,8 @@ function Get-FirstFreeIP {
|
||||
[string]
|
||||
$CIDR,
|
||||
[parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="ByID")]
|
||||
[ValidateScript({ $_ -match "^\d+$" })]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]
|
||||
[int]
|
||||
$Id,
|
||||
[parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Position=0,ParameterSetName="BySubnetObject")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
@@ -19,7 +18,7 @@ function Get-FirstFreeIP {
|
||||
process {
|
||||
$_params = @{
|
||||
Controller = [PS.IPAM.controllers]::subnets
|
||||
Method = [PS.IPAM.methods]::GET
|
||||
Method = "GET"
|
||||
}
|
||||
switch ($PSCmdlet.ParameterSetName) {
|
||||
"ByID" { $_subnetId = $Id; break }
|
||||
|
||||
Reference in New Issue
Block a user