I'm trying to remove all Office 365 applications and any file with the word Microsoft in it from all our Macs. I wrote a .sh script and it is installed with Composer. Then a I have a script run that is sudo sh /path to .sh command. The Composer package will remove all the applications after a while but most of the rest of the files aren't removed. If I copy one line and paste it into Terminal it will run and remove the file(s). Why will the Terminal commands work in Terminal but not when I run them in Composer. My .sh script is setup like this but with a lot more paths listed: Thanks!
sudo rm -R /Applications/Microsoft\\ Excel.app;
sudo rm -R /Applications/Microsoft\\ OneNote.app;
sudo rm -R /Applications/OneDrive.app;
sudo rm -R /Applications/Microsoft\\ Outlook.app;
sudo rm -R /Applications/Microsoft\\ PowerPoint.app;
sudo rm -R /Applications/Microsoft\\ Word.app;
sudo rm -R /Applications/Microsoft\\ Teams.app;
sudo rm -R /Applications/Microsoft\\ To Do;
sudo rm -R /Applications/Office.app;
sudo rm -R /Applications/Microsoft\\ OneDrive.app;
sudo rm -R /Applications/'Outlook*’;
sudo rm -R /Applications/Microsoft*;
sudo rm -R /Users/*/Library/Containers/com.microsoft*;
sudo rm -R /Users/*/Library/Containers/'OneDrive File Provider';
sudo rm -R /Users/*/Library/Containers/Microsoft*;
