What scripts and helpdesk tools do you use with self service?

neilrooney_old
New Contributor II

Hi everyone! I've been slowly building out our self service with software from VPP, scripts for updating and some help desk tools.

I was hoping you all could share some of the scripts and other tools you use for your users. There have been some older threads showing off their tools but they are a little sparse on how to make them work. One great one I saw, but have no idea how to get it to work, was an emergency backup to Google Drive.

I would love to see some scripts for updating Adobe CC and some other nifty scripts for helpdesk. Attached is what I have so far. a2a4ee6f69fd41bf85e99fb8a4952c16

Cheers everyone! 🙂

118 REPLIES 118

Stubakka
Contributor II

Could anyone share what they use for the reset or Fix Keychain scripts? I just started my jump start and am building out self service. Any tips or suggestions are welcome.

jwojda
Valued Contributor II

@scottb where is the

$USER
coming from?

NOLA2FLA
New Contributor II

@emily Can you possibly share the Gatekeeper script or the link where you got the Gatekeeper script? We have devs that would need that sometimes. As long as it is approved by our security first. Thanks.

AdamCraig
Contributor III

PE2000
Contributor

@wildfrog

How does "Allow Printer Administration" policy work?

Thanks

atomczynski
Contributor III

Lots of pretty icons.

Can someone post their scripts or links to:

Optimize My Mac

Allow Printer Administration

Reset NVRAM

Computer Maintenance

Display Computer Information

Collect Diagnostic Logs

Optimize My Computer

... Toolbox Maintenance

fernandez_payen
New Contributor III

Thanks to all the posts above, this is what is set up in my environment!
273c1d4897dd4205a4ef749bf2826ca4

VladCabrera
New Contributor III

@emily Hello, What does your fix parental control policy do? I have found some issues after getting some computers off AD.

Santosh
New Contributor III

@fernandez.payen if possible can you please share the script for Screen sharing and also please what dose Remote Support dose in Self service ?

thanks a lot in advance

fernandez_payen
New Contributor III

@Santosh

#!/bin/sh

sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist

/usr/sbin/dseditgroup -o edit -a (ADMIN_ACCOUNT) -t user com.apple.access_ssh

Remote Support installs a QuickSupport application and launches it. Also provides a prompt telling the user to provide the ID and password to IT to authorize the remote session.

GabeDevOps
New Contributor

@fernandez.payen Could you share the script for Google chrome clean up?

fernandez_payen
New Contributor III

@GabeDevOps

#!/bin/sh

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# ABOUT THIS SCRIPT
#
#       Written by: Fernandez Payen
#       Created on: April 24, 2020
# 
#       Purpose: Closes application "Google Chrome". Locates all cache 
#                and cookies directly from saved location on mac and
#                deletes them. Once completed, it relaunches Google Chrome.
#
#       IMPORTANT: Google Chrome must be downloaded and installed.
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# USER VARIABLES
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Get current user
CURRENT_USER=`ls -l /dev/console | awk '{ print $3 }'`


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# MAIN PROCESS
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Close Google Chrome
killall "Google Chrome"

# Removes cache and cookies
rm -R /Users/$CURRENT_USER/Library/Application Support/Google/Chrome/Default/Cookies
rm -R /Users/$CURRENT_USER/Library/Caches/Google

# Relaunches Google Chrome
cd /Applications
open Google Chrome.app

ThierryD
New Contributor III

Where can you find those nice icons?

fernandez_payen
New Contributor III

PE2000
Contributor

@ neilrooney_old

Hi

How did you setup software update in self service?
on the back end?
many thanks!!!

djquazzi
New Contributor II

This is mine. What does "Fix my internet" do? @fernandez.payen

bd83173fe49b41608a669a8a3ed43166

AdamCraig
Contributor III

@djquazzi Curious what your Maintenance, Internet Speed Test and Should I restart policies do?

tlarkin
Honored Contributor

Do any of you all have actual usage data on these policies? UX and adoption should be somewhat data driven though usage data. I am just curious because I am finding out my employees rarely use self service, or they don't use it at the rate I would expect. We do have a lot of automation in place though, so that is a factor for us.

djquazzi
New Contributor II

@strayer
Maintenance

User caches, User Saved Application State, System Caches, Turns Off Open windows after login, Flush DNS, Restarts,

Internet Speed Test

https://github.com/danielnovello/Jamf/blob/master/speed_test.sh

Should I restart

If machine has been up for X days, inform and restart

https://github.com/danielnovello/Jamf/blob/master/should_I_restart.sh

MatG
Contributor III

@tlarkin I wish jamf would make it easier to get stats from Self Service for the exact same reasons. We seem to maintain a lot of Sefl Service items but find users are fairly ignorant to it.

DBrowning
Valued Contributor

@tlarkin We used to require login to SS. I would then capture the AccessLogs in splunk. That was when we had an On-Prem JSS. Now that we are cloud, we've lost access to that kind of data.

tlarkin
Honored Contributor

We ship policy webhooks to our data platform, and self service is barely used at my Org. If people want an app they typically just go download it. They also want IT to just patch it. Looking at the data by policy ID (since jamf does not include self service == True/False in the hook) it is very low for the total number of policies ran. To give context though, we actively try to patch non running apps at every check in. So, obviously the automation is going to run a lot more than self service, but the number of self service policy execution is very low.

tlarkin
Honored Contributor

@ddcdennisb logging in doesn't mean usage though. I can log in and look for something and not find it and just go somewhere else and get it. It is at least something though

fernandez_payen
New Contributor III

@djquazzi Fix My Internet

#!/bin/sh

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# ABOUT THIS SCRIPT
#
#       Written by: Fernandez Payen & Abel Santana
#       Created on: April 27, 2020
# 
#       Purpose: Closes VPN connection. Deletes all DNS Servers and 
#                Search Domains. Executes an IP Release/Renew.
#
#       IMPORTANT: A network connection is required to execute. To be 
#                  executed if user is experiencing proxy or ip error 
#                  message.
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# MAIN PROCESS
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

#Force Quit Tunnelblick
sudo killall "$VPN"

#Delete all DNS Servers
sudo networksetup -setdnsservers Wi-Fi empty

#Delete Search Domains
sudo networksetup -setsearchdomains Wi-Fi empty

#Release DHCP
sudo ifconfig en0 down

#Renew DHCP
sudo ifconfig en0 up

I am still trying to a way to cache this script or make it available when a network connection is spotty. I'm gonna eventually try to make this script an executable within all users "/Documents" folder so it is easily accessible.

jameson
Contributor II

@fernandez.payen Hi,
What about the self service you have about "no macos updates pending". How it that working ?

blackholemac
Valued Contributor III

@tlarkin I have a lot of problems here encouraging Self Service too. The pandemic is opening people's eyes to it more though. We share a problem in that I do a lot for the Mac users automagically instead. My positioning with them is that "Self Service allows me to install the things you want IT's way without having to have one of us come over and interrupt your classroom or take control of your screen at the worst time." I've seen an uptick in usage over the past two years, but folks are really used to me doing x or y from them. I'd love it if you come across any tricks at encouraging the Self Service mentality.

jhuls
Contributor III

@blackholemac I think I'm in the same boat as it's just like our kb site and helpdesk portal where users would rather call or email someone than open something from their system to carry out a task.

All I can do is try to make the process of using those things as simple as possible and try to demonstrate the advantages to it. It works for a few but many are very stubborn to it. Unfortunately it's usually older users who seem to be set in their ways.

One thing I'm doing to encourage Self Service use is by requiring it in the Dock. I wanted it originally as a menubar item and have a feature request in with Jamf to have as an option but it didn't get much traction among those who frequent here. I'm also pushing for the Windows admins to promote the use of SCCM's Software Center more. I figure if our help desk talks things up more about how the users can accomplish more as if it's an App Store, then that should help. It's a slow painful process though as there's not much buy in. The windows folks tend to want to use Software Center for their own use rather than the users for some reason.

tlarkin
Honored Contributor

@blackholemac culture is a thing too for us. I was deploying some binaries for a specific group of employees and I was just going to self service it. I was told by engineering managers that I needed to automate it, because engineers should not have to stop what they are doing and fumble around in an app to get software that IT should just provide. I 100% agreed with this manager and I have automated those type of installs ever since.

So, really my company just barely uses self service and they all prefer IT to automate things versus them having to waste their time clicking a bunch of buttons in an app. I honestly do not blame them, as IT Engineering teams get paid to do this stuff.

MikeF
Contributor II

for the NVRam clearing I just made a policy that runs this command. nvram -c
I just added to self-service and set it up for a reboot after. This works for us.

cajamfpro
New Contributor

@MikeF how are you running the nvram -c command in self service? We're getting this Result of command:

nvram: Error clearing firmware variables: (iokit/common) not permitted

MikeF
Contributor II

This was pretty easy for the self-service part
on files and processes tab i put on the execute command nvram -c
I then schedule a reboot if needed and the system goes down right away for an authenticated reboot. I have never bothered to check the logs as what i wanted to clear was the find my mac setting and this was all i checked. It was clear

I have also told my techs when thy are setting a mac up for re-image we also format the drive here. After formatting they open the terminal and run that command without a reboot. That always cleared the setting. My log files just report running the policy. I did not finds any errors.

The only thing i scheduled the reboot for is the setting will not actually change in the NVRAM without it.

Jeff_Owen
New Contributor II

@txhaflaire I was wonder what your "Updating Adobe CC Applications" script does and if you are open to sharing it.

fredrik_virding
Contributor

Thought i share some stuff i run.

Some Forms via Microsoft Forms in Bookmarks, works like a charm.

Some printer reset scripts.

Flushing cache and cookies for Chrome.

And Temporary Admin as well.

PE2000
Contributor

@fredrik.virding

Hi

Temporary Admin, How are you running this?

Many thanks in advance!!!

fredrik_virding
Contributor

@PE2000 Hi!

Im running this one:
https://soundsnw.wordpress.com/2020/01/26/zsh-script-to-grant-standard-users-temporary-admin-rights/

Located that post and did some testing. Have tried other versions too, but i found that this version works best for our environment. Doing some extra tweaks on it now to make it a bit smarter.

A_Eaton
New Contributor II

Bumping this thread. Would love tho get some great examples of how you are using Self Service in your environment today.

dgeiler
New Contributor III

If possible where can I get those applications?

Jeff_Owen
New Contributor II

Screen Shot 2021-11-15 at 9.10.21 AM.png

dgeiler
New Contributor III

we currently do not have any optimization applications in self-service