I am trying to encrypt a file with multiple public keys and used the same syntax that is there as part of the documentation and it is throwing the below error.
Error Message
gpg : usage: gpg [options] --encrypt [filename] At line:10 char:1 + gpg --encrypt \ --recipient "Sree" \ --recipient "Matam" \ "C:Reports\ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (usage: gpg [opt...rypt [filename]:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError
P.S: This encryption is done as part of a powershell script
When I encrypt with a single key, it works fine. Can someone point what is it that I am doing wrong?
gpg --encrypt \ --recipient "Sree" \ --recipient "Matam" \ "C:\Reports\test_encryption.xlsx"
I used this thread to guide me but looks like I am missing something
Got this bit to work finally. Thanks to @user2864740
$BeforeEncryptfilePathGPG = "C:\Reports\Test_Encryption.xlsx"
$SignedOrEncryptedLoc = "C:\Reports\Test_Encryption.xlsx.gpg"
gpg --output $SignedOrEncryptedLoc --always-trust --encrypt --recipient "Sreekar" --recipient "Matam" $BeforeEncryptfilePathGPG