-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutlook-erase.sh
More file actions
44 lines (39 loc) · 1.52 KB
/
outlook-erase.sh
File metadata and controls
44 lines (39 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#########################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# Outlook Erase Tool
#
# SYNOPSIS
# outlook-erase.sh
# FOR INITIAL DEPLOYMENT OR ENROLMENT USE ONLY
#########################################################################
#
# HISTORY
#
# Version: 1.3
#
# - 1.0 04.08.22 Michael Tanner, Initial Script Template Build
#
#########################################################################
scriptver='1.0'
export CURL_SSL_BACKEND="secure-transport"
logfile="/Library/Logs/com.purplecomputing.mdm/outlook-erase.log"
#Making Purple Cache directories for in the event that the helper script hasn't been run
mkdir -p /Library/Caches/com.purplecomputing.mdm/
mkdir -p /Library/Logs/com.purplecomputing.mdm/
mkdir -p /Library/Caches/com.purplecomputing.mdm/Apps/
curl -o /Library/Caches/com.purplecomputing.mdm/Apps/OU.pkg https://office-reset.com/download/Microsoft_Outlook_Reset_1.9.1.pkg
curl -o /Library/Caches/com.purplecomputing.mdm/Apps/OE.pkg https://office-reset.com/download/Microsoft_Outlook_Data_Removal_1.9.1.pkg
echo "Status: Running the installer" >> ${logfile}
installer -pkg /Library/Caches/com.purplecomputing.mdm/Apps/OU.pkg -target /
installer -pkg /Library/Caches/com.purplecomputing.mdm/Apps/OE.pkg -target /
echo "Status: Cleaning up after the installer" >> ${logfile}
rm -rf /Library/Caches/com.purplecomputing.mdm/Apps/OU.pkg
rm -rf /Library/Caches/com.purplecomputing.mdm/Apps/OE.pkg
sleep 2
echo "Status: Completed" >> ${logfile}
echo Complete
exit 0