How to use a script to Change Virtual Machine's configuration options

1 users found this article helpful

You can use the Parallels desktop command-line interface to change the configuration settings of all virtual machines already registered on a Mac. 

To do so, you first need to create a script to perform a desired configuration modification. 

To create a script, please follow the steps below:

  1. Open the Script Editor application (Finder > Applications > Utilities > Script Editor).


     
  2. Create a new script >  Click on "File" in the menu bar, then select "New Document" to create a new script.
     
  3. Write the script > In the script editor, you'll need to write the code to change the VM options. 

Example: The following is a script example that disables the auto-pause option for all virtual machines registered on a Mac computer:

   for i in $( prlctl list -a --info | grep "ID" | sed 's/.....//;s/.$//' ); do prlctl set $i --pause-idle off done

Note: The script uses the prlctl list command to first obtains a list of registered virtual machines and then (inside the loop) sets the --pause-idle option for every VM to "off". 

     4. Run the script > To run the script, click on the "Run" button in the Script Editor toolbar or press Command + R on your keyboard.

The script will execute and make the changes to the VM options in Parallels Desktop.

Note: This is a basic example script, and you may need to modify it to suit your specific needs. For more information on available commands and options, refer to the Parallels Desktop documentation.

Deploying script using Management tools

You can execute the script on a Mac computer using one of the remote Mac management tools listed below:

• Jamf Pro

• Microsoft Intune

• Kandji

• Apple Remote Desktop (ARD)

• IBM Endpoint Manager

• Mosyle

• Addigy

• Munki

To do so, save the script from Script Editor and upload it to the management tool :

  1. On Script Editor > Click on Save.
  2. Select a location to store the file.
  3. Transfer the script to the management tool.

Was this article helpful?

Tell us how we can improve it.