From 4440531fcb745b27a3a1f5a6b36b74384b6d77f0 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Fri, 27 Dec 2024 09:47:24 +0100 Subject: [PATCH] arp(monitor): add support of VDOM --- PowerFGT/Public/monitor/network/arp.ps1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/PowerFGT/Public/monitor/network/arp.ps1 b/PowerFGT/Public/monitor/network/arp.ps1 index 936f06e97..6d60ba6c1 100644 --- a/PowerFGT/Public/monitor/network/arp.ps1 +++ b/PowerFGT/Public/monitor/network/arp.ps1 @@ -17,9 +17,16 @@ function Get-FGTMonitorNetworkARP { Get Network ARP + .EXAMPLE + Get-FGTMonitorNetworkARP -vdom vdomX + + Get Network ARP of vdomX + #> Param( + [Parameter(Mandatory = $false)] + [String[]]$vdom, [Parameter(Mandatory = $false)] [psobject]$connection = $DefaultFGTConnection ) @@ -29,13 +36,18 @@ function Get-FGTMonitorNetworkARP { Process { + $invokeParams = @{ } + if ( $PsBoundParameters.ContainsKey('vdom') ) { + $invokeParams.add( 'vdom', $vdom ) + } + #before 6.4.x, it is not available if ($connection.version -lt "6.4.0") { Throw "Monitor Network ARP is not available before Forti OS 6.4" } $uri = 'api/v2/monitor/network/arp' - $response = Invoke-FGTRestMethod -uri $uri -method 'GET' -connection $connection + $response = Invoke-FGTRestMethod -uri $uri -method 'GET' -connection $connection @invokeParams $response.results }