I am running a powershell script on an windows 2022 server that encrypts and signs .txt files in preparation to send them.
When I execute the script, it works mostly fine, but sometimes the agent gets "stuck" and does not do anything beyond the message (-verbose option in the powershell script) gpg-enabled compatible flags. From there on, nothing hapens.
I tried it with gpg4win, only GnuPG (Versions 2.4.3; 2.4.0) issue is still persistent. I tried a powershell script that loops the process, after 525 tries, it failed. The other run failed after 30 tries.
$gpgProcess = start-process "${env:ProgramFiles(x86)}\gnupg\bin\gpg.exe" -ArgumentList " --homedir C:\Users\username\AppData\Roaming\gnupg --armor --sign --encrypt --verbose --recipient "receipient>" "$zipFile"" -Wait -PassThru -WindowStyle normal -ErrorAction SilentlyContinue