Hello , Im looking for a powershell script to backup the configuration of all my fortigates .i have fortigate 60D and 300D . any help please ?
FI : We dont have Fortimanager :) Regards,
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hi ,
Kindly follow the following method,
http://kb.fortinet.com/kb/documentLink.do?externalID=FD39818
Regds,
Ashik , NSE8
Thanks .But i prefer use a powershell script to connect to SSH and then launch backup command
For some alternatives, using either pscp.exe from Putty or DLLs, see here:
https://stackoverflow.com...rnative-for-powershell
https://forum.fortinet.com/tm.aspx?m=116738
--------------------------------------------
If all else fails, use the force !
With linux I did it like this:
#! /usr/bin/expect -f set timeout 8000 set date [clock format [clock seconds] -format {%Y%m%d}] spawn ssh <forti user>@<forti ip> expect "password: " send "<forti password>" expect "$ " send "execute backup full-config ftp $date-backup <ftp server ip> <ftp server user> <ftp server user password> expect "$ " send "exit\r"
hm looks a bit the long way :) It will of course do the trick. But maybe you need less code if you just scp your config instead of doing ssh to the FGT and then exec a backup and upload it to a ftp server?
Here is a KB Article that describes how to do that via scp: http://kb.fortinet.com/kb/viewContent.do?externalId=12002
Also there is an older Thread to be found in fortinet forums which is about this: https://forum.fortinet.com/tm.aspx?m=114055
To do scp in powershell you might aswell use freeware like putty's pscp or similar if you don't want/have ps plugins for it. This would then not even require powershell but just a cmd :)
--
"It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams
Elthon Abreu FCNSA v5
Hello Elthon Abreu ,
it would be greatful from you .
Thanks
Azuriste wrote:Hello Elthon Abreu ,
it would be greatful from you .
Thanks
Look at [link]https://forum.fortinet.com/tm.aspx?m=157597#158374[/link]
Elthon Abreu FCNSA v5
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1662 | |
1077 | |
752 | |
446 | |
220 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.