title: gpg encryption in xp_cmdshell
body: <p>I am trying to encrypt a .csv file using gpg in <code>xp_cmdshell</code> command in <code>sql server 2012</code>.
  When I use gpg through <code>xp_cmdshell</code>, it says gpg is not recognized as an internal or external command.
  But this works perfectly on windows cmd.
  How should I configure my sql server to accept this command. Please advice. </p>
  
  <pre><code>select @encrypt = 'gpg -e -r ' + @sEncryptionKey+ ' '+ @sPath + @tempdataFolder+'\'+ @sFileName 
  
  exec master..xp_cmdshell @encrypt
  </code></pre>