Skip to content

Instantly share code, notes, and snippets.

View joshua-d-miller's full-sized avatar

Joshua D. Miller joshua-d-miller

View GitHub Profile
@joshua-d-miller
joshua-d-miller / macOSLAPS-Utility
Last active October 3, 2018 13:05
Command Line utility to get LAPS passwords from AD for macOS
#!/usr/bin/python
'''Get LAPS password for AD Computers'''
# #################################################################
# This script will allow an admin user with
# the proper domain crednetials to get a LAPS
# password form Active Directory.
# ##################################################################
# Original script by barteardon
# https://github.com/bartreardon/macscripts/blob/master/lapssearch
# Updated script using pyObjC:
@joshua-d-miller
joshua-d-miller / TeamViewer15PreInstall.py
Created July 22, 2021 18:23
TeamViewer 15 PreInstall Script
#!/usr/local/bin/psupython
# pylint:disable=C0103, W0703, E0611, W0107
'''TeamViewer 15 PreInstall Script'''
# This will configure our initial settings for
# TeamViewer version 15 and prepare for install
# Joshua D. Miller - [email protected]
# August 13, 2020 - The Pennsylvania State University
from os import listdir, path, remove
from shutil import rmtree
@joshua-d-miller
joshua-d-miller / TeamViewer15PostInstall.py
Created July 22, 2021 18:26
TeamViewer 15 PostInstall
#!/usr/local/bin/psupython
# pylint:disable=C0103
'''TeamViewer 15 PostInstall Script'''
# This will add our congifuration ID to the application
# bundle so that any custom host module visual modifications
# will be downloaded from the site for each user. It will
# also create a launchagent that will keep the TeamViewer
# client running when a user is logged in even if they exit.
# Joshua D. Miller - [email protected]
# August 13, 2020 - The Pennsylvania State University
@joshua-d-miller
joshua-d-miller / ResetmacOSLAPS.sh
Last active October 22, 2023 11:46
Reset macOSLAPS back to the FirstPass key if you know the current password and the keychain item is broken
#!/bin/sh
: '
----------------------
Penn State MacAdmins
----------------------
Performs the following:
- Captures the current password of your local admin
if you know it and then changes the password to
the FirstPassKey
Notes:
@joshua-d-miller
joshua-d-miller / MontereyPostInstall.sh
Last active October 22, 2023 11:13
Performs a macOS Upgrade to Monterey in munki by using this is a postinstall_script. Requires changing the type of installer from *startosinstall* to *copy_from_dmg*. Since we use Jamf Pro we make use of the jamfhelper to block out the screen as the upgrade begins.
#!/bin/sh
: '
------------------------
Penn State MacAdmins
------------------------
Performs the following:
- Installs the latest version of macOS by using the current copied
version from munki
Sources:
- https://scriptingosx.com/2019/09/get-current-user-in-shell-scripts-on-macos/