#!/bin/bash ########################################################################## # Shellscript : Clear uninstall Skype for Business # Author : Andreas Vogel, macenterprise gmbh 27.05.2019 # Source : https://docs.microsoft.com/de-de/SkypeForBusiness/troubleshoot/server-install-or-uninstall/clean-uninstallation ########################################################################## # Variable user=$(stat -f '%u %Su' /dev/console | cut -d ' ' -f 2) # Close Skype for Businnes if run if ( pgrep "Skype for Business" > /dev/null ); then echo "Killing Skype for Business" killall "Skype for Business" else echo "Skype for Business is not running" fi # Remove App from Applicationfolfder rm -rf /Applications/Skype\ for\ Business.app # Remove plist and fils for Skype fpr Businnes rm -rfv /Users/$user/Library/Preferences/com.microsoft.SkypeForBusinessTAP.plist rm -rfv /Users/$user/Library/Logs/com.microsoft.SkypeForBusinessTAP rm -rfv /Users/$user/Library/Application\ Support/Skype\ for\ Business rm -rfv /Users/$user/Library/Containers/com.microsoft.SkypeForBusiness rm -rfv /Users/$user/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.skypeforbusinesstap.sfl rm -rfv /Users/$user/Library/Application\ Support/com.microsoft.SkypeForBusinessTAP rm -rfv /Users/$user/Library/Cookies/com.microsoft.SkypeForBusinessTAP.binarycookies # Remove Keychain Items security delete-generic-password -l "Skype for Business" /Users/$user/Library/Keychains/login.keychain security delete-generic-password -l "com.microsoft.SkypeForBusiness.HockeySDK" /Users/$user/Library/Keychains/login.keychain security delete-generic-password -l "com.microsoft.SkypeForBusinessTAP.HockeySDK" /Users/$user/Library/Keychains/login.keychain security delete-generic-password -l "com.microsoft.skypeforbusiness.webmeetings.HockeySDK" /Users/$user/Library/Keychains/login.keychain