Here are some GPG examples for creating symmetric and asymmetric encrypted messages. The code used below is written for PowerShell.
Download keys from a key server
Import private key
Put the contents of a file into a variable to be encrypted
Symmetric encryption of the variable contents
Symmetric encryption of the variable contents with the passphrase provided
Encrypt the variable contents for a recipient
Decrypt the message sent to recipient