Giving permissions outside the sysadmins role.
If you connect as a low-privilege login, then it will use the xp_cmdshell_proxy_account instead. So try doing EXECUTE AS LOGIN=’lowprivaccount’ first, to see if that helps.
Enable using sp_configure.
xp-cmdshell proxy account.
An error occurred during the execution of sp_xp_cmdshell_proxy_account. Possible reasons: the provided account was invalid or the ‘##xp_cmdshell_proxy_account##’ credential could not be created. Error code: ’5′.