This file contains 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 | |
<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/2cf20236e665fcd7ec41311d50c89c0e |
This file contains 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 | |
Partner Program Manager | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/b6637160b65b751824943ede022daa17 |
This file contains 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 | |
Partner Program Manager | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/b6637160b65b751824943ede022daa17 |
This file contains 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 | |
# list all users with UIDs above 501 | |
usersList=$( /usr/bin/dscl . -list /Users uid | /usr/bin/awk '$2 >= 501 { print $1 }' ) | |
# test for admin | |
while IFS= read aUser | |
do | |
/usr/sbin/dseditgroup -o checkmember -u "$aUser" admin 1>/dev/null |
This file contains 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 | |
# set -x | |
:<<ABOUT_THIS_SCRIPT | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Partner Program Manager | |
Jamf | |
bill@talkingmoose.net |
This file contains 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 | |
# get public IP address | |
publicIP=$( /usr/bin/curl http://ifconfig.me/ip \ | |
--location \ | |
--silent \ | |
--max-time 10 ) | |
# get GeoIP data | |
locationData=$( /usr/bin/curl http://ip-api.com/xml/$publicIP \ |
This file contains 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 "Microsoft Outlook" | |
query freebusy exchange account 1 for attendees {"bill@talkingmoose.net"} range start time date "Thursday, September 8, 2016 at 12:00:00 AM" range end time date "Friday, September 9, 2016 at 12:00:00 AM" interval 60 | |
end tell |
This file contains 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 | |
bill@talkingmoose.net | |
https://gist.github.com/cc4b1d143bcdf7d6d670ab1b30565694 |
This file contains 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 | |
# new user account details | |
username="lapsadmin" | |
displayName="LAPS Admin" | |
password="P@55w0rd" | |
admin="yes" | |
hidden="yes" | |
# determine next available UID |
NewerOlder