Skip to content

Commit ca17ab2

Browse files
committed
SDWAN: Add try/catch for System SDWAN
it is not supported with old FortiOS (before 7.0.x)
1 parent 8832034 commit ca17ab2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Src/Private/Get-AbrFgtSDWAN.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ function Get-AbrFgtSDWAN {
2626

2727
process {
2828

29-
$sdwan = Get-fgtSystemSDWAN
30-
29+
try {
30+
$sdwan = Get-fgtSystemSDWAN
31+
}
32+
catch {
33+
Write-Warning "SD-WAN is not available before FortiOS 6.4.x"
34+
}
3135
if ($sdwan) {
3236
Section -Style Heading2 'SD-WAN' {
3337
Paragraph "The following section details SD-WAN settings configured on FortiGate."

0 commit comments

Comments
 (0)