none
Modify script for hardcoded username and password RRS feed

  • Question

  • Dear All,

    https://github.com/Nevets82/Posh-FortiGate

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

    above script need this script

    https://www.powershellgallery.com/packages/Posh-SSH/2.2/Content/Posh-SSH.psm1

    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

    QUESTIONS:

    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 "192.168.1.99" -HostPort 22 -Credential (Get-Credential) -FilePath "$([Environment]::GetFolderPath(“MyDocuments”))\config.txt" -u admin_readonly -p password

    tq

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

All replies