Installing Parallels Mac Client Using a Script

0 users found this article helpful

Information

A special script is supplied with Parallels Mac Management that you can use to perform an unattended Parallels Mac Client installation. To obtain and use the script, follow these steps:

  1. On the computer running Parallels Configuration Manager Proxy, navigate to the C:\Program Files (x86)\Parallels\Parallels Mac Management for Microsoft SCCM\files directory.
  2. Locate the InstallAgentUnattended.sh file and copy it to a Mac. Alternatively, you can use Apple Remote Desktop to run the script on a Mac remotely.
  3. Please note that you must use sudo to run the script because enrolling a Mac in Configuration Manager requires superuser privileges.
    When you run the script, provide the following parameters (in the order listed):
    agent_download_url — the URL of the Parallels Mac Client installer. The URL can be obtained in the Configuration Manager console as described in Manually Installing Parallels Mac Client. The URL should look exactly like in the next Example section of this article: http://myhost.local:8761/files/pma_agent.dmg
    user_name — specifies the name of a domain user account that will be used to register Parallels Mac Client with the Configuration Manager Proxy. Please note that that the name must contain the domain logon name (e.g. UserName). It must NOT contain a domain name separated by a slash or an at (@) sign.
    user_password — the domain user password.  
    domain_name — your company's domain name.

Example:
$ sudo ./InstallAgentUnattended.sh http://myhost.local:8761/files/pma_agent.dmg myname mypass mydomain
If you receive the Permission denied error when executing the script, run the following command to set the file permissions, and then execute the script again:
$ chmod 755 InstallAgentUnattended.sh If you wish, you can hard code the URL, user/password, and the domain parameter values in the script, so you (or the Mac user) won't have to enter them in the command line. To hard code the parameter values, open the script in an editor and change the values of the input parameters from $1, $2, $3, $4 to the desired values. The parameter names in the script are self-explanatory. Once the script is ready, give it to your Mac users, so they can execute it on their Mac computers, or use Apple Remote Desktop to execute it on Mac computers remotely.
When the script runs on a Mac, it displays the information in the console about the processes that it's running. When the script completes executing, it returns a numeric code. To see the return code, run the following command after the scrip finished executing:
$ echo $?
The 0 code returned by the above command indicates that Parallels Mac Client has been installed and registered properly. Any other code indicates a failure (you can also read the last messages in the console to get an idea of what went wrong.

Was this article helpful?

Tell us how we can improve it.