try AppleScript.. better than a kill: (you may need to change the name here, don't have teams)
#!/bin/sh
osascript <<EOF
try
tell application "Microsoft Teams"
quit
end tell
end try
EOF
If you are using Microsoft's Teams package, the preinstall script in the package will quit teams for you without you needing to do anything else.
If you are using Microsoft's Teams package, the preinstall script in the package will quit teams for you without you needing to do anything else.
Thanks for replying. I do run the pkg but I've noticed since switch to the new teams version app crashes after install but if I fully remove the app then install seems to work better. I was able to script to remove the app just haven't figured out script to force close it as well.
If you are using Microsoft's Teams package, the preinstall script in the package will quit teams for you without you needing to do anything else.
Thanks for pointing me in the right direction here is final script that worked
Quit Teams Classic if it's running
osascript -e 'quit app "Microsoft Teams (work or school)"'
Remove the Teams work or School app
rm -rf //Applications/Microsoft\\ Teams\\ \\(work\\ or\\ school\\).app
try AppleScript.. better than a kill: (you may need to change the name here, don't have teams)
#!/bin/sh
osascript <<EOF
try
tell application "Microsoft Teams"
quit
end tell
end try
EOF
Sorry I replied to wrong post
Thanks for pointing me in the right direction here is final script that worked
Quit Teams Classic if it's running
osascript -e 'quit app "Microsoft Teams (work or school)"'
Remove the Teams work or School app
rm -rf //Applications/Microsoft\\ Teams\\ \\(work\\ or\\ school\\).app