Skip to content

Instantly share code, notes, and snippets.

@joshua-d-miller
Created June 23, 2014 21:33
Show Gist options
  • Save joshua-d-miller/39a3438409ac82186c50 to your computer and use it in GitHub Desktop.
Save joshua-d-miller/39a3438409ac82186c50 to your computer and use it in GitHub Desktop.
Check for Exchange Account AD
#!/bin/bash
/usr/bin/dscl -plist /Active\ Directory/Domain/All\ Domains -read /Users/username > /tmp/Exchange.plist
if /usr/bin/defaults read /tmp/Exchange dsAttrTypeNative:msExchHomeServerName
then
echo "Yes"
else
echo "No"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment