Looking for the best way to create a policy to remove Skype for Business from all Macs in our environment.
Page 1 / 1
@cpruitt You might find this MS document helpful as the basis of writing a removal script: How to do a clean uninstallation of Skype for Business on Mac
@sdagley Thank you, this is exactly what I was looking for.
Feel free to use this as a jump point. I normally remove the basic user folders since this app gets reinstalled a lot but you can add the rest of the folders if needed.
#!/bin/sh
consoleuser=$(ls -l /dev/console | awk '{ print $3 }')
echo "logged in user is" $consoleuser
pkill -f Skype
security delete-generic-password -l "Skype for Business" /Users/$consoleuser/Library/Keychains/login.keychain
folders=(
"/Applications/Skype for Business.app"
"/Library/Internet Plug-Ins/MeetingJoinPlugin.plugin"
#
"/Users/$consoleuser/Library/Containers/com.microsoft.SkypeForBusiness"
"/Users/$consoleuser/Library/Logs/LwaTracing"
"/Users/$consoleuser/Library/Saved Application State/com.microsoft.SkypeForBusiness.savedState"
"/Users/$consoleuser/Library/Preferences/com.microsoft.SkypeForBusiness.plist"
)
search="*"
for i in "${folders[@]}"
do
echo "removing folder ${i}"
rm -rf "${i}"
done
if [ $? == 0 ]; then
echo "Success"
else
echo "Failure"
fi
@r... If you put a code block tag (the triple back-tick - ```) before and after your script it won't be mangled when displayed
What about killing the process with Restricted Software and doing an app removal if someone tries to execute it? - Just throwing ideas out there :)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.