Friday, June 21, 2019

2015 MacBook Pro battery recall checker script – Sound Mac Guy

2015 MacBook Pro battery recall checker script – Sound Mac Guy: #!/bin/bash

# Check a list of serial numbers for eligibility in the 2015 MacBook Pro battery replacement recall
# Returns only eligible serial numbers
# The text file must be formatted with Unix (LF) line breaks
#
# Usage: mbpserialcheck.sh /path/to/inputfile.txt
#
# To output directly to a CSV file: mbpserialcheck.sh /path/to/inputfile.txt > /path/to/outputfile.csv
#
# Written by Neil Martin https://soundmacguy.wordpress.com
#
# With thanks to Nick Tong for his original Jamf EA which gave me the inspiration for this script. https://www.jamf.com/jamf-nation/discussions/32400/battery-recall-for-15-mid-2015-mbp
#
# 2019-06-21

# Edit the variable below to the filename of your text file containing a list of serial numbers to check
file=$1

# Do not edit below this line
# Verify the file exists
if [[ ! -e "$file" ]]; then
echo "Serial number list file not found or specified"
echo "Ensure there are no spaces and that the path specified is correct"
echo "Script usage: ./mbpserialcheck.sh /path/to/file.txt"
exit 1
fi
data=$(cat $file)

# Loop through the list and submit data to Apple
for serial in $data; do
guid=$(uuidgen | tr "[:upper:]" "[:lower:]")
postData="{\"serial\":$serial,

No comments:

(33) Best Practices for Deploying Platform SSO with Microsoft Entra ID–Michael Epping, Mark Morowczynski - YouTube

(33) Best Practices for Deploying Platform SSO with Microsoft Entra ID–Michael Epping, Mark Morowczynski - YouTube