diff --git a/bitwardenBackup.ps1 b/bitwardenBackup.ps1 index cc4bc64..33f0fce 100644 --- a/bitwardenBackup.ps1 +++ b/bitwardenBackup.ps1 @@ -139,7 +139,7 @@ if ($zip -or $encrypt) { if ($encrypt) { # encrypt the zip export with gpg Write-Host "Encrypting the backup zip with your bitwarden password..." - & $gpg --batch --passphrase "$password" --symmetric --cipher-algo AES256 --digest-algo SHA512 --compression-algo Uncompressed --output "$PSScriptRoot\$zipFilename.gpg" "$PSScriptRoot\$zipFilename" + & $gpg --no-options --batch --passphrase "$password" --symmetric --cipher-algo AES256 --digest-algo SHA512 --compression-algo Uncompressed --output "$PSScriptRoot\$zipFilename.gpg" "$PSScriptRoot\$zipFilename" # securely delete the zip export with sdelete Write-Host "Securely deleting the zip file..." & $sdelete -p 25 "$PSScriptRoot\$zipFilename" @@ -148,4 +148,5 @@ if ($zip -or $encrypt) { # remove all the variables Remove-Variable -Name * -ErrorAction SilentlyContinue # logout of bitwaren to ensure the session is destroyed -& $bw logout \ No newline at end of file +& $bw logout +exit 0 \ No newline at end of file