Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Get-FGTMonitorSystemInterfaceDHCPStatus #264

Merged
merged 5 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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....)
alagoutte marked this conversation as resolved.
Show resolved Hide resolved

.EXAMPLE
Get-FGTMonitorSystemInterfaceDHCPStatus
alagoutte marked this conversation as resolved.
Show resolved Hide resolved

Get License Status with status, version and last_update
alagoutte marked this conversation as resolved.
Show resolved Hide resolved

#>

Param(
[Parameter (Mandatory = $true, Position = 1)]
alagoutte marked this conversation as resolved.
Show resolved Hide resolved
[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 {
}
}