Kaseya Community

MacOS procedure

  • Hi all, I was wondering if someone could assist with a macOS procedure that I have created.

    We've had a requirement to push custom company MS Teams backgrounds to our mac users. We have done this already for our Windows users but im having trouble with macs

    Firstly, my knowledge of managing macs with Kaseya is very limited, hence this post so I appolgise 

    I need to copy 8 images froma MS blob storage locations to ~/Library/Application \Support/Microsoft/Teams/Backgrounds/Uploads on a client mac

    I have created a bash script to copy the images and it works from the terminal: curl https//company.blob.core.windows.net/backgrounds/image1.jpg -o  ~/Desktop/Backgrounds/Uploads/image1.jpg

    I have created the below procedure but it will not apply. For a basic test I used location ~/Desktop/Backgrounds/Uploads on a test mac rather than the full teams path: ~/Library/Application \Support/Microsoft/Teams/Backgrounds/Uploads

    1. executeShellCommand ("mkdir -p ~/Desktop/Backgrounds/Uploads", "Execute as System", "Mac OS X", "Halt on Fail")

    2. executeShellCommand ("curl https//company.blob.core.windows.net/backgrounds/image1.jpg -o  ~/Desktop/Backgrounds/Uploads/image1.jpg", "Execute as System", "Mac OS X", "Halt on Fail")

    The logs say its ran but nothing happens, any help is appreciated 

  • When running the commands as user System, I wouldn't expect to see the results under any user profile.

    I bet if you look at the file system on the Macs you have run this on, you will find a folder /users/Desktop/Backgrounds/Uploads or /users/root/Desktop/Backgrounds/Uploads with the files you were trying to copy.

    Need to Run as User for the files to show up for the users, or create a variable to copy the files to /users/*/Desktop/Backgrounds/Uploads

    If it was Windows, I would be making a batch file that included FOR and EACH statements.

    sorry, idk how to do it on Mac.

    This page might be of help:


    [edited by: eric at 12:38 PM (GMT -7) on Apr 27, 2020]
  • The '~' denotes the home folder of the user.  System, on *nix machines is root and root's home is / which is the root of the file system.  

    On BSD & macOS (essentially the same) /Users/ is where the home folders are for each user so you want to get the images into /Users/<username>/Library/Application\ Support/Microsoft/Teams/Backgrounds/Uploads/ for the currently logged in user, and any other users who will be using teams.  You will also need to chown and/or chmod the access to the files if you write them with root to allow the user to read them.

    You may want to check if the Teams will use the system Library /Library/Application\ Support/..... and if so how you might set the backgrounds globally by using it.

    You may want to automate the process by using Apple Script and have the user interact and provide their credentials as approval to download the files and make the changes.  This is the standard for most *nix  systems and *nix users, unlike Windows users, prefer to see that the OS is protecting them and requiring that they approve any changes.

  • Hi Eric, thank you for the reply. I have now resolved this issue thanks to your input.

    It was my logic of the file system that was incorrect but I have updated my procedure and it now copies the images to the correct folder.

    Thanks again


  • Hi Pedro, thank you very much for your detailed reply. I have now resolved my issue thanks to your input.

    It was due to a lack of knowledge using unix file system,

    Thanks again