Modify script for hardcoded username and password RRS feed

  • Question

  • Dear All,


    1st script https://github.com/Nevets82/Posh-FortiGate/blob/master/Posh-FortiGate.psm1

    above script need this script


    I am using this powershell script to backup Fortigate successfully, but the problem is it will pop up screen and ask me to key-in username/password every time I ran that script


    1. how to modify those script so that I don't have to key-in username/password manually

    I prefer is hardcoded in CLI i.e 

    PS> Backup-FortiGateConfig -HostAddress "" -HostPort 22 -Credential (Get-Credential) -FilePath "$([Environment]::GetFolderPath(“MyDocuments”))\config.txt" -u admin_readonly -p password


    • Moved by jrv Thursday, November 21, 2019 1:25 PM Not a script question
    Thursday, November 21, 2019 1:21 PM

All replies