Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed --JamfUser and added a failure message #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Unlicense
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#set -x

TOOL_NAME="Microsoft Office 365/2019/2016 License Removal Tool"
TOOL_VERSION="3.1"
TOOL_VERSION="3.2"

## Copyright (c) 2018 Microsoft Corp. All rights reserved.
## Scripts are not supported under any Microsoft standard support program or service. The scripts are provided AS IS without warranty of any kind.
Expand Down Expand Up @@ -488,6 +488,9 @@ function GetSudo {
fi
}

# Global bash command arguments
BASH_GLOBAL_ARGV=("$@")

# Evaluate command-line arguments
if [[ $# = 0 ]]; then
ShowUsage
Expand Down Expand Up @@ -528,7 +531,7 @@ else
--JamfUser)
# Used to remove Office 365/2019/2016 activation for Jamf script. Example Self Service script.
# Parameter 4: --All, Parameter 5: --ForceClose, Parameter 6: --JamfUser
USER=$3
USER=${BASH_GLOBAL_ARGV[2]}
GetHomeFolder "$USER"
shift # past argument
;;
Expand All @@ -539,6 +542,11 @@ fi

## Main
SetConstants
# Check for user variable.
if [ -z "$USER" ]; then
echo "ERROR: No user value found, please validate arguments."
exit 1
fi
# Check first for detection mode
if [ $DETECT ]; then
VLPRESENT=$(DetectPerpetualLicense)
Expand Down Expand Up @@ -752,4 +760,4 @@ if [ $REMOVEVL ] || [ $REMOVEO365 ]; then
echo "Existing flight data removed."
fi

exit 0
exit 0