Sudo Ditto "$oneDriveDirectory/Downloads-old" "$oneDriveDirectory/Downloads" Sudo Ditto "$oneDriveDirectory/Documents-old" "$oneDriveDirectory/Documents" Sudo Ditto "$oneDriveDirectory/Desktop-old" "$oneDriveDirectory/Desktop" Sudo ln -s "$oneDriveDirectory/$dir_to_link2" "/Users/$currentUser/$dir_to_link2"Įcho "Copy old OneDrive content to OneDrive" Sudo mv -f "/Users/$currentUser/$dir_to_link1" "$oneDriveDirectory"įor dir_to_link2 in Desktop Documents Downloads Movies Pictures Music You need to setup OneDrive first, then run again"Įcho "Renaming folders in existing OneDrive to name -old"įor dir_to_link1 in Desktop Documents Downloads Movies Pictures Music usr/local/bin/jamf policy -event install-onedriveĮcho "Folder not found. Sudo killall OneDrive| sudo rm -R '/Applications/OneDrive.app/'Įcho "Removing OneDrive from Applications" OneDriveDirectory="/Users/$currentUser/OneDrive - Replace with your company name" #!/bin/bashĬurrentUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCop圜onsoleUser import sys username = (SCDynamicStoreCop圜onsoleUser(None, None, None) or ) username = ] (username + " It will look in the existing users home folder and rename folders to not conflict with any that are already in OneDrive. This is what it does: It removes the old version of OneDrive and installs the newest version from a JAMF policy. Is there a risk with this breaking in feature macOS yes like anything it's a script and not an Apple created solution. ![]() Apple doesn't support it just like anything since they didn't create they don't support. Here is my script I have used it over a year now and also done macOS upgrades without any issues.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |