Skip to main content
Question

How can I write a script to uninstall Zscaler (pass required) from a Jamf policy?

  • February 25, 2023
  • 3 replies
  • 436 views

Forum|alt.badge.img+1

This command works from the Terminal when I activate my Admin button beforehand:

#sh /Applications/Zscaler/.Uninstaller.sh

And then it prompts the password. If I enter:

#sh /Applications/Zscaler/.Uninstaller.sh <password>

And put in the actual password, it will go straight to uninstalling it, but only from the Terminal.

If I put this same script in a Jamf policy, it won't push. I'll hit my sync button and it will fail. Has anyone figured this out before? Thanks.

I followed the instructions here already: Uninstalling Zscaler Client Connector | Zscaler

3 replies

Forum|alt.badge.img+8
  • Valued Contributor
  • February 26, 2023

I am looking at this script as a basis to write my own, perhaps  it will also help you. Lines 15-24 could also be used for  an EA, just my .02, about to go on holiday so may be a few weeks before I start. AHaron-Zscalar -Script 


Forum|alt.badge.img+11
  • Valued Contributor
  • February 27, 2023

I've used this successfully:

 

#!/bin/sh

function removeZscaler () {
PWord=`echo 'password' | base64 --decode`
/bin/sh /Applications/Zscaler/.Uninstaller.sh $PWord
}

#Is Zscaler installed
if [ -f "/Applications/Zscaler/Zscaler.app/Contents/Info.plist" ]; then
removeZscaler
else
echo "Not Installed"
fi


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • February 27, 2023

I am sure zscaler has this function. However, this is the kind of thing you want to go to the vendor for. You guys are paying for zscaler support, open a ticket and make them support you.