When you need to change the configuration settings of all virtual machines that are already registered on a Mac computer, you can use the Parallels desktop command-line interface.
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:
- Open the Script Editor application (Finder > Applications > Utilities > Script Editor).
- Create a new script > Click on "File" in the menu bar, then select "New Document" to create a new script.
- Write the script > In the script editor, you'll need to write the code to change the VM options.
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 above 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.
(Please note that the script provided is a basic example, and you may need to modify it to suit your specific needs. You can refer to the Parallels Desktop documentation for more information on available commands and options)
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
• Apple Remote Desktop (ARD)
• IBM Endpoint Manager
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.