Extension Attribute That Shows Whether Or Not The User Has Enabled The New Outlook

john_sherrod
Contributor II

As you probably know, users can now use a toggle within Outlook to enable the New Outlook. But not all of the features our users rely on have been added to the New Outlook yet and we've gotten some tickets about it. We deployed a configuration profile that hides the toggle, but I was curious how many of our users actually enabled the New Outlook, so I wrote an extension attribute script that reports on that. Sharing here in case anyone else finds it useful:

#!/bin/sh

# Displays whether or not the user has enabled the New Outlook.
# Script will return the info as an extension attribute.
# Author: jwsherrod@mac.com
# Version 1.0 : 10-23-2020

loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

NewOutlook=$(/usr/bin/defaults read /Users/$loggedInUser/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist IsRunningNewOutlook)

if [ $NewOutlook -eq 1 ]; then
    echo "<result>New Outlook</result>"

else echo "<result>Old Outlook</result>"

fi
0 REPLIES 0