Hello all! Hoping to gain some knowledge / help from anyone that likes to use terminal commands. I'm having trouble mounting a network share with the end goal of using that network share as a time machine back location for a few of our machines. Here's the script I have so far. It works when executed locally BUT I get an error code when we try to run it attached to a policy. I have VERY limited experience with scripting and terminal commands. I've attached the error I get. Thanks in advance!
Client Machines are running macOS 10.10.5
JSS Version JSS 9.101.0
Begin Script
Mount the network Drive
osascript -e ‘Mount Volume “afp://[username]:[password]@[IP Address]/TimeMachine”’
sleep 5
Hide the network drive to help prevent the user from unmounting it
chflags hidden “/Volumes/TimeMachine”
sleep 5
Restart Finder to show new session
osascript -e ‘quit application “Finder”’
