Posted on 10-21-2019 11:48 AM
Our company has recently decided to move away from Skype for Business and start using Microsoft Teams. Part of this process is to remove Skype from the login items about a month before uninstalling. I have attempted some scripts that I have found and they haven't been successful. We are running mainly Mojave and Catalina.
Posted on 10-21-2019 12:10 PM
The only way I know how to do it is with an AppleScript command (osascript), which only works on the currently logged in user's login items.
But you'd have to have a proper PPPC profile in place to allow osascript access to System Events for it to work in Mojave and Catalina.
The command would look something like this:
/usr/bin/osascript -e 'tell application "System Events" to delete login item "Skype for Business"'