This article describes the procedure by which you can provide Service Portal users the ability to mount, unmount or upgrade VMware Tools with a single click. To do this, a Command Workflow is configured using a script.
Requirements
- vCommander® 5.2 or later
- PowerShell v3 installed on vCommander application server
- VMware PowerCLI
- Embotics® vCommander REST API PowerShell libraries
- Mount/Unmount/Update scripts
Creating the Service Workflows
This solution requires that the scripts to mount, unmount, or upgrade VMware tools be available on the vCommander server, where they will be called by the workflow.
- Download the Mount/Unmount/Update scripts package to the vCommander application server.
- Extract the three scripts to
C:\scripts\commands\
- Edit the script to provide the location of your encrypted credentials file.
- Browse to Configuration > Command Workflows.
- Click Add.
- Provide the Name Mount VMware Tools and choose a suitable icon. Click Next.
- Click Add and choose Execute Script.
- Edit the step as follows:
- Step Name: Mount VMware Tools
- Step Execution: Always Execute
- Timeout: 300
- Script Output: Capture script output as comment
- When Step Fails: Mark workflow step as failed: do not proceed
- Command Line:
Powershell.exe c:\scripts\commands\MountTools.ps1 #{target.deployedName} #{target.managedSystem.name}
- Click Next.
- On the Permissions page, either select Allow everyone to access this workflow or Allow these specific users/groups to access this workflow and choose the appropriate users, groups, and/or organizations.
- Check Display in Service Portal and Prompt for confirmation (optionally adding a message). Click Next.
- Click Finish.