Skip to content

Instantly share code, notes, and snippets.

@dongri
Created March 29, 2020 13:19
Show Gist options
  • Save dongri/614ee9a049ea5c35c733f4a5c9e3fdc9 to your computer and use it in GitHub Desktop.
Save dongri/614ee9a049ea5c35c733f4a5c9e3fdc9 to your computer and use it in GitHub Desktop.
# Run with elevated privileges
# If you have Connect Wise Control installed, remove it. IT organizations are likely to install it (or similar tool) if they feel the need for Netskope clients.
# RE: https://saputra.org/threads/remove-screenconnect-or-connectwise-control-from-windows-mac-linux.45/
function remove_cswincom() {
thumbprint=$(ls /Library/LaunchAgents/connectwisecontrol-* | head -1 | awk -F- '{print $2}')
# Stop the ConnectWiseControl Client service
launchctl unload /Library/LaunchAgents/connectwisecontrol-${thumbprint}-onlogin.plist
# Delete the service definitions
rm -f /Library/LaunchAgents/connectwisecontrol-${thumbprint}-*.plist
# Delete the ConnectWiseControl Client files:
rm -fr /opt/connectwisecontrol-${thumbprint}.app
}
function remove_netskope_client() {
# Stop the Netskope Agent service
launchctl unload /Library/LaunchAgents/com.netskope.stagentui.plist
# Delete Netskope service definitions
rm -fr /Library/LaunchAgents/com.netskope.*
# Remove Netskope app files
rm -fr /Applications/Remove\ Netskope\ Client.app
rm -fr /Library/Application\ Support/Netskope
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment