VMware Fling – PowerActions for vSphere Web Client
VMware released a new fling called ‘PowerActions for vSphere Web Client’ which integrates the vSphere Web Client and PowerCLI to provide complex automation solutions from within the standard vSphere management client. In short, PowerAction can now run PowerShell/PowerCLI scripts from the Web Client!
How does it work?
PowerActions is a vSphere Web Client Plugin that allows users to run PowerCLI scripts from the vSphere Web Client interface. These commands are sent to a separate machine running PowerCLI and the PowerActions software. The PowerActions Plugin includes two menu items on the homepage of the Web Client as well as a PowerCLI menubar item when the user right-click’s on objects within the web client (read more below).
PowerActions integrates the vSphere Web Client and PowerCLI to provide complex automation solutions from within the standard vSphere management client. PowerActions is deployed as a plugin for the vSphere Web Client and will allow you to execute PowerCLI commands and scripts in a vSphere Web Client integrated Powershell console.
Furthermore, administrators will be able to enhance the native WebClient capabilities with actions and reports backed by PowerCLI scripts persisted on the vSphere Web Client. Have you ever wanted to “Right Click” an object in the web client and run a PowerCLI script? Now you can!
For example I as an Administrator will be able to define a new action for the VM objects presented in the Web client, describe/back this action with a PowerCLI script, save it in a script repository within the Web client and later re-use the newly defined action straight from the VM object context (right click) menu.
Or, I as an Administrator can create a PowerCLI script that reports all VMs within a Data Center that have snapshots over 30 days old, save it in a script repository within the Web client and later execute this report straight from the Datacenter object context menu.
Or better yet, why not share your pre-written scripts with the rest of the vSphere admins in your environment by simply adjusting them to the correct format and adding them to the shared script folder.
Check out the power of this fling in the video below to get an idea.
What are the Requirements?
Please ensure you meet the following requirements, as other versions may not have been tested and cannot be guaranteed to work. The following is a list of prerequisites needed for using PowerActions:
- PowerShell 2.0 – Later versions not yet supported.
- VMware vSphere 5.1 or later
PowerShell Host Machine
- Windows 2003 Server or newer (*)/Vista or newer
- .NET framework 4.0*
- PowerCLI version supporting your current VMware vSphere version
* Note: .NET framework 4.5 is not supported. Windows 2012 Server/Windows 8 and Windows 8.1 come with 4.5 by default, so a downgrade to .Net Framework 4.0 is required on these versions of Windows.
- Administrative privileges (registering a service with VMware Lookup Service and creating a user for SSO) are required for installation, but not for use of the product.
- Prior to installation, ensure that the PowerShell Host machine and the machine hosting the VMware Lookup Service are synced via the same time source, otherwise cryptic error messages may appear.
You can download PowerActions here.
Now that we’ve completed the installation we can login to the vSphere Web Client. You will now see two new menu items on the left-hand side of the screen. ‘PowerCLI Console’ and ‘PowerCLI Scripts’.
Clicking on the PowerCLI Console button will bring up just that, a PowerCLI Console for running commands.
If you go to the PowerCLI Scripts menu item it brings us to a script repository. This area allows users to save personal scripts as well as setup shared scripts. This is a fantastic capability to have a repository of scripts that can be run by you and/or others without duplicating efforts. You can see I’ve already added in a few scripts.
To add a script click the “create a script” icon below the “MyScripts” dropdown.
Enjoy the power of CLI in your vSphere Web client!