-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Get-FGTMonitorSystemInterfaceDHCPStatus
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} | ||
} |