Last active
February 23, 2016 16:48
-
-
Save cshepp1211/656f1566cad85e3b0705 to your computer and use it in GitHub Desktop.
DeleteMCX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# written by Kirk Skaar | |
# | |
# v1.1 | |
# | |
# 19 September 2014 | |
# Script to remove MCX managed preferences | |
# | |
# Removes the Managed Preferences directory | |
# and then deletes mcx from nodes in DS | |
rm -rf /Library/Managed\ Preferences | |
dscl localhost -mcxdeleteall /Local/Default/Users | |
dscl localhost -mcxdeleteall /Local/Default/Groups | |
dscl localhost -mcxdeleteall /Local/Default/Computers | |
dscl localhost -mcxdeleteall /Local/Default/ComputerGroups | |
dscl localhost -mcxdeleteall /Local/Default/ComputerLists | |
killall cfprefsd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment