I'm trying to remove a SSID from clients. I use -
networksetup -removepreferredwirelessnetwork en0 'SSID Name'
Works when I push it through ARD and/or as a command from the "Execute Command" option of Files and Processes section of a policy.
When I push it as a .sh file compiled via TextEdit, it fails.
Any help is appreciated!
Error Log from Casper Remote:
Sending Wake On LAN command...
Opening SSH Connection to IP Address
Authenticating...
Successfully authenticated.
Verifying Computer's Identity...
The MAC Address has been verified.
Checking Operating System Version...
Running Mac OS X 10.8.5 (12F37)
Verifying /usr/sbin/jamf...
/usr/sbin/jamf is current (9.11)
Verifying /Library/Preferences/com.jamfsoftware.jamf.plist...
Preparing Policy...
Executing Policy 2013-10-02 at 1:05 PM | xxxx | 1 Computer...
Mounting Casper Share to /Volumes/CasperShare...
Running script Remove SSID.sh...
Script exit code: 2
Script result: /Library/Application Support/JAMF/tmp/Remove xxx.sh: line 1: {rtf1ansiansicpg1252cocoartf1187cocoasubrtf390: command not found
/Library/Application Support/JAMF/tmp/Remove SSID.sh: line 2: syntax error near unexpected token `}'
/Library/Application Support/JAMF/tmp/Remove SSID.sh: line 2: `{fonttblf0fromanfcharset0 Times-Roman;}'
Submitting log to https://casper.xxxx.xxx.xxx:8443/
Finished.