This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
:<<'ABOUT_THIS_SCRIPT' | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
[email protected] | |
https://gist.github.com/talkingmoose/5336e69480d87014a4c2ea1d6ec0ea4e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# server connection information | |
URL="https://talkingmoose.jamfcloud.com" | |
userName="API-Editor" | |
password="P@55w0rd" | |
httpErrorCodes="200 Request successful | |
201 Request to create or update object successful | |
400 Bad request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function logresult() { | |
if [ $? = "0" ] ; then | |
echo "$1" | |
else | |
echo "$2" | |
exit 1 | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# server connection information | |
URL="https://talkingmoose.jamfcloud.com" | |
userName="API-Editor" | |
password="P@55w0rd" | |
httpErrorCodes="200 Request successful | |
201 Request to create or update object successful | |
400 Bad request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# server connection information | |
URL="https://talkingmoose.jamfcloud.com" | |
userName="API-Editor" | |
password="P@55w04d" | |
# number of days from now that the extension attribute can be safely deleted because of non-use | |
deleteInDays="30" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Messages" | |
-- phone numbers must already exist in Contacts | |
set phoneNumbers to {"6125550000 John Smith", ¬ | |
"6125551111 Mary Poppins", ¬ | |
"6125552222 Larry Bud Melmon"} | |
-- https://stackoverflow.com/questions/11812184/how-to-send-an-imessage-text-with-applescript-only-in-provided-service | |
repeat with aNumber in phoneNumbers | |
set targetService to (1st service whose service type = iMessage) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
:<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
[email protected] | |
https://gist.github.com/84cbe002aca35c73032bccd230d8988a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# adds the additional input source to the list of input sources | |
/usr/bin/defaults write com.apple.HIToolbox AppleEnabledInputSources -array-add '<dict><key>InputSourceKind</key><string>Keyboard Layout</string><key>KeyboardLayout ID</key><integer>89</integer><key>KeyboardLayout Name</key><string>Latin American</string></dict>' | |
# enables the input menu in the menu bar | |
/usr/bin/defaults write com.apple.TextInputMenu visible -bool true | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IT is responsible for patch management, but users should be afforded the opportunity to install updates when convenient for them. | |
Communication is key. Where possible start with unobtrusive methods to notifiy users they need to install updates such as via email. In the email, include the deadline and a link to a policy to "update now". Use HTML formatting and graphics to help them understand what will happen and make the updates easy. | |
If email communications fail to get users to update, use a JamfHelper script in a policy to nag users once per day they need to update. Provide a button that links to the policy to "update now" and another button to "remind later". Users should not be able to close the nag until they click either of the buttons. Consider automatically closing the nag after 10 minutes and allowing the policy to reopen it at next checkin. After the user acknowledges the nag by clicking a button, write a time stamp to a file to prevent the nag from appearing the rest of the day. Alternatively, in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get currently logged in user | |
currentUser=$( /usr/bin/stat -f "%Su" /dev/console ) | |
echo "Current user is $currentUser." | |
# set Do No Disturb for the current user to enabled between 7:01 a.m. and 7:00 a.m. | |
su "$currentUser" -c "defaults write ~/Library/Preferences/ByHost/com.apple.notificationcenterui.plist dndEnd -int 420" # minutes | |
su "$currentUser" -c "defaults write ~/Library/Preferences/ByHost/com.apple.notificationcenterui.plist dndStart -int 421" # minutes |