Hi!
Has anyone managed to get information about the iMac computer's SSID running MacOS BigSur via extensions attribute. If so, how did you do it?
Regards
Hi!
Has anyone managed to get information about the iMac computer's SSID running MacOS BigSur via extensions attribute. If so, how did you do it?
Regards
Best answer by bzuidema
Hello,
This is what I have been using to get this information, it works on both M1 and Intel macs as well as all MacOS versions.
#!/bin/sh
##Get the wireless port ID
WirelessPort=$(networksetup -listallhardwareports | awk '/Wi-Fi|AirPort/{getline; print $NF}')
##Collect new preferred wireless network inventory and send back to the JSS
PreferredNetworks=$(networksetup -listpreferredwirelessnetworks "$WirelessPort" | sed 's/^ //g')
echo "<result>$PreferredNetworks</result>"The results look like this
Preferred networks on en1:
Wireless1
Wireless2
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.