Hey just curious is there a way to remove a wifi profile from a device using Hexnodeuem? This way the profile needs to be forgotten on the device. Do you guys have any ideas?
Remove a wifi profile off a deviceSolved
Tags
Replies (4)
I spent quite some time researching the hexnode docs to find if any feature for doing so is available. But couldn’t find any. Only found ones for configuring wifi profiles and some restrictions like ‘Connect to MDM configured Wi-Fi networks only’ for ios devices which can be used to restrict them from connecting to any wifi not configured by the admin. If your primary concern is about users connecting to unnecessary or unwanted wifis maybe check that out.
Also I think it’d be good if you could mention which os u r working with so that others can help in finding proper solution for u..
@marien Thanks for the suggestion! Although we are actually looking for a specific case of removing wifi profiles already present on Macs. Still open to all suggestions…
Our go-to solution for such cases where the specific feature is not provided is to run scripts from Hexnode portal. They have this execute custom script action to perform system-level configs on macs and windows without getting the users involved. Check that out and I’m sure u’ll be able to get ur case sorted!
@gnish We appreciate you reaching out to us. Although looks like @paue came through for you.
To remove a Wi-Fi profile from a Mac, log in to your Hexnode portal and run the following scripts using the Execute Custom Script action:
- Firstly, list the various network devices and their denomination:
1 2 |
#!/bin/sh sudo networksetup –listallhardwareports |
From the Action History, click on Show Output and note the value of ‘Device’ for the ‘Hardware port: Wi-Fi’ from the output. Ex: en0, en1.
2. Next, check the list of preferred networks on the device by providing the value noted earlier:
1 2 |
#!/bin/sh sudo networksetup -listpreferredwirelessnetworks en1 |
Now, click on Show Output and copy the name of the network you want to remove.
3. Finally, in the below script, replace wifi_to_be_removed with the copied network SSID.
1 2 |
#!/bin/sh sudo networksetup -removepreferredwirelessnetwork en1 wifi_to_be_removed |
Please note that you do not have to run all 3 scripts each time. If you know the Device value corresponding to the Wi-Fi port and the network’s SSID you want to remove; you can directly run the third script.
If you are interested in more such scripts to configure settings not natively available in the UEM, check out our extensive Sample Script Repository.
Please try out these steps and let us know if you need further assistance.
Cheers!
Emma Jones
Hexnode UEM