I'm not sure what you mean by example scripts. There are template Extension Attributes in the JSS (which are mostly all script based) and there are scripts located here on JamfNation related to products or other functions. But I don't know of example scripts that would be used in say, a policy that come as part of the install. Unless that's something very new.
Thanks. I read there was a bashexample.sh test script that came with Casper that would be good to check out. But my Real problem is that I found a script online (Remove2011) and I put it in JSS but I'm getting an Exit Code 1. Am I suppose to edit this script? Or I am Suppose to enter some parameters in the policy? Not sure how to do either.
@Vernaf I think you'd need to post the script here or a link to it for us to look at to help you. It's virtually impossible for anyone to tell you why a script is exiting code 1, or guide you on what to do, without actually looking at the script.
I've added it to a package then run this command (in the same policy) after the pkg has been installed: 'sh /$path_to_script/MS_OfficialRemoveOffice2011.sh --force'
So it installs as a package, it doesn't actually do anything until it's triggered by the command which is set to run after the install. Correct? Does it matter the location of the install or does the command finds it on it's own?
Scripts our very helpful in completing task that profiles cannot accomplish. I prefer using scripts to mount our network drives because I find it is more reliable than profiles. Here is an example of a drive mount script I use.
#!/bin/bash
# Script to mount network drives.
theuser=$(/usr/bin/who | awk '/console/{ print $1 }')
/usr/bin/osascript > /dev/null << EOT
tell application "Finder"
activate
mount volume "INSERT PATH TO VOLUME HERE "
end tell
EOT
echo $theuser
killall cfprefsd
defaults write com.apple.finder ShowMountedServersOnDesktop true
killall -HUP Finder