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

JonHarvey11
New Contributor

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 3

efil4xiN
Contributor II

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 

daniel_behan
Contributor III

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
Honored Contributor II

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.