Enabling Silverlight for Safari

This recipe is to show how to enable Silverlight in Safari on your macOS machines since it is no longer enabled by default. This can be done using a script sent out to your machines. 

Step-by-step guide

The Fileset is one that you can send to your devices. The Fileset will enable Silverlight and turn it "On" when visiting new sites. 

  1. Download the attached Fileset
  2. Upload the Fileset to your FileWave server and deploy to a handful of test machines.  

The Fileset contains the below script and executes it once on activation. 

#log all to filewave client log
#Written by Avery Thomas
#Modified by Alex Fredlake 1/3/2018
exec 1>>/var/log/fwcld.log
exec 2>>/var/log/fwcld.log

users=$(ls /Users | grep -v ".localized" | grep -v "Shared"| grep -v "Guest" | grep -v ".DS_Store")
for oneUser in $users
echo "Enabling Silverlight (Safari) for user: $oneUser"

sudo -u $oneUser /usr/libexec/PlistBuddy -c "Set :PlugInInfo:com.microsoft.SilverlightPlugin:plugInCurrentState true" /Users/$oneUser/Library/Preferences/com.apple.Safari.plist

sudo -u $oneUser /usr/libexec/PlistBuddy -c "Set :ManagedPlugInPolicies:com.microsoft.SilverlightPlugin:PlugInFirstVisitPolicy PlugInPolicyAllowWithSecurityRestrictions" /Users/$oneUser/Library/Preferences/com.apple.Safari.plist

exit 0