This solution works for us, but may not be for everyone. Here is an Apple script I am using. I saved it as an app and distributed within /library. I then created a configuration profile to display the drives on the desktop and to trigger the script at login. It checks to see if the user is on our WiFi if so, mounts the drives.
# Mount Network Shares
# Written by Ian Lau, Modified by Jared Flitt
# Modified: 2/26/18
# CAUTION: You cannot define multiple file shares to mount. One file share per script.
# Define file share.
property shareAddr : "DEFINE SHARE PATH HERE"
# Eject file share if it is already mounted.
tell application "Finder"
try
eject disk "yourShare"
end try
end tell
# Determine the current wireless network the computer is connected to.
try
set SSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'"
end try
# Check to see if the device is on the local network where the file share is accesible. If so, connect to the file share - If not, do not connect to the file share.
if SSID contains {"WIFI NETWORK HERE"} then
tell application "Finder"
mount volume shareAddr
end tell
else if SSID contains {"WIFI NETWORK HERE"} then
tell application "Finder"
mount volume shareAddr
end tell
end if
Find this helpful? Click the kudos button. Thanks!