Posted on 01-31-2019 02:54 AM
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.
Cheers everyone! :)
Posted on 01-31-2019 06:17 AM
Posted on 01-31-2019 12:00 PM
Could you share the scripts for updating Adobe CC, re-index spotlight and display computer information? @txhaflaire Repair outlook search is also done via script?
Posted on 01-31-2019 12:24 PM
Ours are very environment specific but I can share an "Uptime" Script that lets the students / staff users check the computer uptime with a click of the button. I deployed this as an applescript applet to the computer and the self service button runs the app. If they really want to they can run the Uptime app themeselves via Spotlight, save it to the dock or use Self Service.
try
set AppleScript's text item delimiters to " "
--message, space after " is intentional
set TIMINGC to " If the Uptime Exceeds 12:00 (12 Hours), Restart your MacBook."
--uptime
set uptime to do shell script "uptime"
--Selects 1st line of command line which contains Uptime
set FullUptimeDialog to paragraph 1 of uptime
set TEXT4 to text item 4 of FullUptimeDialog
set TEXT5 to text item 5 of FullUptimeDialog
set TEXT6 to text item 6 of FullUptimeDialog
set TEXT7 to text item 7 of FullUptimeDialog
--Displays Uptime (Days, Hours XX:XX, Users & Message)
display dialog "Uptime: " & TEXT4 & TEXT5 & TEXT6 & TEXT7 & TIMINGC with icon ":System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:Clock.icns" as alias buttons {"Okay"}
end try
Posted on 01-31-2019 12:40 PM
Just push it out to your fleet and then set a policy that runs
open /path/to/OutlookSearchRepair.app
Posted on 01-31-2019 12:46 PM
Posted on 11-14-2021 01:08 PM
I am new to Jamf is it possible to know how and where to get these applications or packages?
Posted on 01-31-2019 10:19 PM
@neilrooney What @dtommey said, just create a policy and push it to a /tmp folder oi. Then the one liner to open the app.
For the others you can contact me at slack if you would like to!
Posted on 02-01-2019 01:56 AM
See here for the Display Computer Information stuff.
Posted on 02-01-2019 05:38 AM
I would recommend getting the Office cleanup applications as well Like
Link : https://macadmins.software/tools/
Posted on 02-01-2019 05:57 AM
@mark.mahabir Nice! considering changing mine around!
Posted on 02-01-2019 07:28 AM
I see some great examples here! In the process of adding some more tools.
Posted on 02-01-2019 08:21 AM
The "Optimize" policy flushes system and user caches, checks the disk, and reboots. It' sounds more professional than "plesae restart your computer".
Posted on 02-01-2019 08:24 AM
@Seetendra We looked at the MS-supplied app to set default, but it only did so for mail and not for calendar events or contacts. This is why we use the app that Rich Trouton developed. It uses duti to assign Outlook as default for contacts and events as well as mail.
Posted on 02-01-2019 08:49 AM
Would love to know some of the resources, scripts etc. where you got some of this from and if any of these are built in even better!
Posted on 02-01-2019 11:16 AM
@mack525 What you exactly do in the "Set Time Zone" policy?
Posted on 02-01-2019 12:36 PM
@maik.sanftenberg When used with Self Service, enables a non-admin user to change time zone on his or her Mac.The script will offer to set the time zone automatically if it detects the time zone is set manually. Otherwise, the script will first present a short list of commonly used time zones. If selected, the script will present a full set choices based on UNIX time zones. Full script is on my Github Page
Posted on 02-01-2019 12:39 PM
@txhaflaire Curious to see what your "Tools for tech's" has in it :) if you dont mind sharing.
Posted on 02-01-2019 02:44 PM
@daniel_ross For me it was a case of what things could I create a button for so the users could do what they were asking to do on their own and not call me. From there it was just finding/stealing a script to do those things.
@txhaflaire What is the difference between "Repair Outlook Search" and "Re-Index Spotlight"?
Posted on 02-01-2019 03:08 PM
Ours are largely network/cert related, but there are a few other handy things in there too. (Sorry, had to scrub some titles.)
Much to my chagrin, "Fix Skype for Business" doesn't involve burning it with fire.
Posted on 02-01-2019 07:55 PM
Nice @emily... icons8 ftw!
Posted on 02-02-2019 10:23 AM
@emily dIsAbLe GaTeKeEpEr? ???????
Also, love the easy button icon.
The one tool I always find handy is a log scraper. Often times you will ask your help desk for logs, often times they forget what logs are relevant, you can even document how to get the logs in a wiki, and they may not read it. So, make a policy that copies all relevant logs into a folder on the user's desktop and zips it, then the user can attach that to a help desk ticket.
Also, out of curiosity, how often does all the flush caches and fix disk permission actually fix stuff? I cannot say I have seen those tools really fix a Mac outside a few very rare exceptions in my time.
Posted on 02-02-2019 10:24 AM
@tlarkin more of a pause, for when developers need to YOLO weird tool installers. It's actually rarely used, but has been handy for some people. I think the timer is like 15 minutes.
Posted on 02-02-2019 10:27 AM
@emily those pesky developers! I also like the idea of labeling that type of stuff YOLO MODE
so they know they are not doing the right thing, haha
Posted on 02-03-2019 10:05 AM
Posted on 02-04-2019 01:38 AM
@neilrooney how do you handle the dns flush script with mdnsresponder and the formerly flush dns?
@emily whats about this fix skype for business?
Posted on 02-04-2019 09:04 AM
@AxelK it's a script that cleans up keychain entries and application save state/cache data.
Posted on 02-05-2019 03:35 AM
<delete>
Posted on 02-05-2019 03:36 AM
@txhaflaire do you require logout after "Font rendering macOS Mojave" (i assume its defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO) or it there a way to apply changes without it? thank you.
Posted on 02-05-2019 03:49 AM
@emily how do you fix parentalcontrolsd issue? i we used to unload the daemon, but it stopped working in 10.12 afair.
Posted on 02-05-2019 03:58 AM
our one.
Posted on 02-05-2019 12:27 PM
Shout out to @neilrooney and everyone who has contributed to this post! You've inspired me and given us some ideas for a "help desk" category of our own in Self Service.
Posted on 02-05-2019 02:27 PM
Hi @defiler , can you tell us more about your "Get Wifi Guest Password"?
Thanks
Posted on 02-06-2019 06:53 AM
@emily I would be really interested what the "assign this mac" function does?
Posted on 02-06-2019 07:00 AM
@wildfrog how are you achieving the reset printer system?
Posted on 02-06-2019 07:17 AM
The "Provision" tile is scoped to computers that have been enrolled to Jamf in the past 3 days and is used on computers by the technician for computers that we either can't enroll into our DEP or computers that, even if we can, we can't reset. Our provision policy that is triggered on enrollment only runs if our local admin account doesn't exist, so for already existing computers it doesn't run. With this policy we can force it to run.
Posted on 02-06-2019 08:44 AM
@emily a bit ot but we are having loggin issues with some users with sfb. i'm looking into this a long time but never found a solution. maybe i'm missing something. your script could be my holy grail?!
Whats the issue for using this script?
Posted on 02-06-2019 08:49 AM
Hey @AxelK, I can't speak for @emily, but we had a lot of SfB sign-in issues and we found that basically blowing away a few key files seemed to fix any login issues we saw.
Below is the code we used for our Fix SfB as we have moved over to Teams now.
#!/bin/sh
#gets user name as variable
user=`python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");'`
#Close SFB
if ( pgrep "Skype for Business" > /dev/null ); then
echo "Killing SFB"
killall "Skype for Business"
else
echo "SFB is not running"
fi
#Remove files for SFB
rm -rfv /Users/$user/Library/Preferences/com.microsoft.SkypeForBusinessTAP.plist
rm -rfv /Users/$user/Library/Logs/com.microsoft.SkypeForBusinessTAP
rm -rfv /Users/$user/Library/Application Support/Skype for Business
rm -rfv /Users/$user/Library/Containers/com.microsoft.SkypeForBusiness
rm -rfv /Users/$user/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.skypeforbusinesstap.sfl
rm -rfv /Users/$user/Library/Application Support/com.microsoft.SkypeForBusinessTAP
rm -rfv /Users/$user/Library/Cookies/com.microsoft.SkypeForBusinessTAP.binarycookies
#Remove Keychain Items
security delete-generic-password -l "Skype for Business" /Users/$user/Library/Keychains/login.keychain
security delete-generic-password -l "com.microsoft.SkypeForBusiness.HockeySDK" /Users/$user/Library/Keychains/login.keychain
security delete-generic-password -l "com.microsoft.SkypeForBusinessTAP.HockeySDK" /Users/$user/Library/Keychains/login.keychain
security delete-generic-password -l "com.microsoft.skypeforbusiness.webmeetings.HockeySDK" /Users/$user/Library/Keychains/login.keychain
Posted on 02-06-2019 08:51 AM
@defiler it just looks for the process and kills it. It's rarely used by anyone these days so we're likely to retire it.
@AxelK back when we migrated from hosted Exchange to O365 people had trouble getting a fresh sign-in so we made the policy to help get a fresh login prompt. Unsure if that would be related to issues you're seeing. It just goes through the keychain to look for entries for Skype for Business and deletes them, then clears the application cache data.
Posted on 02-06-2019 09:36 AM
@neilrooney assuming that just removes all printers you can achieve this with lpadmin and use it again to re-add whichever you like
lpstat -p | cut -d' ' -f2 | xargs -I{} lpadmin -x {}