View Jamf Pro Provisioning 2.zsh
#!/bin/zsh | |
<<'ABOUT_THIS_SCRIPT' | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net |
View SearchLDAP Examples.sh
#!/bin/sh | |
# -H = LDAP URI | |
# -x = use simple authentication instead of SASL | |
# -b = search base | |
# -D = user principal name (UPN) of authenticating user | |
# -w = password of authenticating user | |
# look up a user's manager's distinguished name |
View MegaPKGr.zsh
#!/bin/zsh | |
:<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/e9ed319226c6da30dd633725e48a97b0 |
View Report admin status.bash
#!/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 |
View Report unknown network services.zsh
#!/bin/zsh | |
# list of known network services that should be excluded from results | |
defaultNetworkServices="An asterisk (*) denotes that a network service is disabled. | |
USB-C Dock Ethernet | |
Apple USB Ethernet Adapter | |
Wi-Fi | |
iPhone USB | |
Bluetooth PAN | |
Thunderbolt Bridge" |
View "Early Adopter" extension attribute
#!/bin/zsh | |
enrollmentStatus=$( /usr/bin/defaults read '/Library/Preferences/EarlyAdopter.plist' Enrolled ) | |
echo "<result>$enrollmentStatus</result>" |
View Delete account from current user's Internet Accounts.sh
#!/bin/bash | |
# get name of currently logged in user | |
currentUser=$( /usr/bin/stat -f "%Su" /dev/console ) echo "Current user is $currentUser." | |
# get current user's home folder | |
homeFolder=$( /usr/bin/dscl . read "/Users/$currentUser" NFSHomeDirectory | /usr/bin/awk -F ": " '{ print $2 }' ) | |
# remove account by description name from Accounts sqlite database | |
/usr/bin/sqlite3 "$homeFolder/Library/Accounts/Accounts4.sqlite" 'DELETE FROM ZACCOUNT WHERE ZACCOUNTDESCRIPTION = "Exchange"' |
View Make new Outlook Address Book and Contact.applescript
tell application "Microsoft Outlook" | |
make new address book in exchange account 1 with properties {name:"Company Contacts"} | |
make new contact with properties {first name:"Martin", last name:"Moose", email addresses:{{address:"mmoose@talkingmoose.net", type:work}, {address:"martin@aol.com", type:home}}} at address book "Company Contacts" of exchange account 1 | |
end tell |
View add-AD-user-data-to-Jamf-Pro.ps1
# INSTRUCTIONS | |
# Create a folder on the Administrator Desktop named "Project" | |
# Run the script to generate the AES key | |
# Run the script to generate the Active Directory encrypted password file | |
# Run the script to generate the Jamf Pro encrypted password file | |
# Update the following variables: | |
# JamfProServer |
NewerOlder