Public/IPAddress.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# Copyright 2019, Alexis La Goutte <alexis dot lagoutte at gmail dot com>
# Copyright 2019, Cédric Moreau <moreaucedric0 at gmail dot com>
#
# SPDX-License-Identifier: Apache-2.0
#

function Get-ArubaSWIpAddress {

    <#
        .SYNOPSIS
        Get IP Address information.
 
        .DESCRIPTION
        Get IP Address(es) information about the device
 
        .EXAMPLE
        Get-ArubaSWIPAddress
        This function give you all the informations about the ip parameters configured on the switch
    #>


    Param(
        [Parameter (Mandatory=$False)]
        [ValidateNotNullOrEmpty()]
        [PSObject]$connection=$DefaultArubaSWConnection
    )

    Begin {
    }

    Process {

        $uri = "rest/v4/ipaddresses"

        $response = Invoke-ArubaSWWebRequest -method "GET" -uri $uri -connection $connection

        $run = ($response | ConvertFrom-Json)

        $run.ip_address_subnet_element
    }

    End {
    }
}