Skip to content

Commit

Permalink
Add Get-FGTMonitorSystemInterfaceDHCPStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Moreau committed Sep 13, 2024
1 parent eb56663 commit 6054c7a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions PowerFGT/Public/monitor/system/interface/dhcp-status.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright 2024, Cedric Moreau <moreaucedric0 at gmail dot com>
#
# SPDX-License-Identifier: Apache-2.0
#
function Get-FGTMonitorSystemInterfaceDHCPStatus {

<#
.SYNOPSIS
Get Interface DHCP Status
.DESCRIPTION
Get Client DHCP Status for an interface (Fortiguard, forticare....)
.EXAMPLE
Get-FGTMonitorSystemInterfaceDHCPStatus
Get License Status with status, version and last_update
#>

Param(
[Parameter (Mandatory = $true, Position = 1)]
[string]$interface,
[Parameter(Mandatory = $false)]
[psobject]$connection = $DefaultFGTConnection
)

Begin {
}

Process {

$uri = "api/v2/monitor/system/interface/dhcp-status?mkey=$($interface)"
$response = Invoke-FGTRestMethod -uri $uri -method 'GET' -connection $connection
$response.results
}

End {
}
}

0 comments on commit 6054c7a

Please sign in to comment.