we need to remove VPN Icon from menu bar
any idea how to achieve this via configuration profile?

we need to remove VPN Icon from menu bar
any idea how to achieve this via configuration profile?

Best answer by sdagley
@madhavigandhi1 It's not a Configuration Profile, but here's a script to remove the VPN menu:
#!/bin/sh
# Remove the VPN menu from the System UI Server's Menu Extras list
currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
runAsUser() {
currentUserID=$(id -u "$currentUser")
if [ "$currentUser" != "loginwindow" ]; then
/bin/launchctl asuser "$currentUserID" sudo -u "$currentUser" "$@"
fi
}
runAsUser /usr/libexec/PlistBuddy -c 'delete menuExtras: "/System/Library/CoreServices/Menu Extras/VPN.menu"' /Users/$currentUser/Library/Preferences/com.apple.systemuiserver.plist
runAsUser /usr/bin/killall cfprefsd
runAsUser /usr/bin/killall SystemUIServer
exit 0
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.