< Back

Backup-FortiGateConfig

Sat Jan 18, 2020 7:49 pm

NAME Backup-FortiGateConfig



SYNOPSIS

Creates a backup of the FortiGate device config.





SYNTAX

Backup-FortiGateConfig [-HostAddress] <String> [[-HostPort] <Int32>] [-Credential] <PSCredential> [-FilePath]

<String> [-Full <SwitchParameter>] [-AcceptKey <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

Creates a backup of the FortiGate device config to the specified file.





PARAMETERS

-HostAddress <String>

The SSH host address of the FortiGate device.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HostPort [<Int32>]

The SSH host port of the FortiGate device.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>

The SSH credentials to use.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Full [<SwitchParameter>]

Full configuration with default values.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AcceptKey [<SwitchParameter>]

Automatically accept SSH key.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FilePath <String>

The path to the file that will be used to write the running config to.



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Backup-FortiGateConfig -HostAddress "192.168.1.99" -Credential (Get-Credential) -FilePath

"$([Environment]::GetFolderPath(???????MyDocuments???????))\\config.txt"





-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Backup-FortiGateConfig -HostAddress "192.168.1.99" -HostPort 22 -Credential (Get-Credential) -Full

-FilePath "$([Environment]::GetFolderPath(???????MyDocuments???????))\\config.txt"





-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Backup-FortiGateConfig -HostAddress "192.168.1.99" -HostPort 22 -Credential (Get-Credential) -AcceptKey

-FilePath "$([Environment]::GetFolderPath(???????MyDocuments???????))\\config.txt"







RELATED LINKS