@Steve Johnson , Rajesh1257, Martyn Burgess - based on the investigation it appears that some of the default PS modules are not getting loaded in the script when it is executing in the Azure Sandbox. In addition to EXO module please upload the following modules as well to Automation Account to ensure that they are available for loading by the runbook job -
Hope this helps. Please let us know if you have any questions.