Dynamics AX: Turning off specific tasks

Recently I had a someone ask me how to turn off or disable the Export to Excel task. Unfortunately, like most tasks, it can’t be disabled via the options dialog like the Document handling subsystem can be (Tools/Options/General/Miscellaneous/Document handling active). In the AX2012 client, the task keyboard shortcuts like Ctrl+T don’t go through the buttons, so disabling the Export…