diff --git a/PowerFGT/Public/monitor/system/interface/dhcp-status.ps1 b/PowerFGT/Public/monitor/system/interface/dhcp-status.ps1 new file mode 100644 index 000000000..5fe3719d9 --- /dev/null +++ b/PowerFGT/Public/monitor/system/interface/dhcp-status.ps1 @@ -0,0 +1,41 @@ +# +# Copyright 2024, Cedric Moreau +# +# 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 { + } +}