How To Execute Bash Script Against Mac

Discussion in 'Parallels Mac Management for Microsoft SCCM' started by RobinL1, Feb 23, 2016.

  1. RobinL1

    RobinL1 Bit Poster

    Is it possible to have a script file to be executed / run on a Mac using Parallels?

    I'm thinking I could create a Program in SCCM and point it to a .sh file - is this the right way to do this?

    For example, I have the following script which I want to run after we install Office 2011 on a Mac:

    # Suppress Office First Run Setup For Each New User
    sudo defaults write /Library/Preferences/ HowToCheck -string Manual
    sudo defaults write /Library/Preferences/ LastUpdate -date '2001-01-01T00:00:00Z'
    sudo defaults write /Library/Preferences/ SQMReportsEnabled -bool NO
    sudo defaults write /Library/Preferences/ ShipAssertEnabled -bool NO
    sudo defaults write /Library/Preferences/ "14\UserInfo\UserOrganiation" -string 'Our Company Name'
    sudo defaults write /Library/Preferences/ "14\FirstRun\SetupComplete" -int 1
    defaults write /Library/Preferences/ "14\UserInfo\UserName" -string 'John Smith'


  2. Evgeny Smirnov

    Evgeny Smirnov Parallels Developers

    Robin, you have two options:
    1) Use Software Package with Program like: /bin/bash and Run mode: Run with administrative rights
    2) Use Configuration Item for Mac with Script setting type. Set Discovery or both Discovery and Remediation scripts.
    Remove 'sudo' from your script, it is not needed.

Share This Page