General

Getting (re)Started with PowerActions

The vSphere HTML5 Web Client Fling version 5 has been released and there is a much-awaited surprise: PowerActions is back!

PowerActions is the easiest way to run PowerCLI commands and scripts directly from the vSphere Client. Its first appearance was at VMworld in 2013! It was then introduced in 2014 with a PowerCLI Console and the ability to access a PowerCLI Script Library directly through the vSphere Web Client. However, since that time, the vCenter Server has changed dramatically. The Windows vCenter has evolved into a vCenter Server Appliance (VCSA). The vSphere Web Client has been deprecated and been replaced with the HTML5 based vSphere Client.

To help aid us in the process of these transitions was the introduction of a fantastic utility known as the vSphere HTML5 Web Client Fling. This fling allowed us to introduce the latest and greatest functionalities outside of the normal vSphere release cycle. A little more than a year ago, the fling introduced the concept of a Developer Center. This centrally located area has been the target for all kinds of resources that developers and automation specialists look for. To date, there has been the introduction of Code Capture and the API Explorer. This latest update to the fling re-introduces PowerActions.

In the spirit of the original, this version of PowerActions comes with two distinct areas within the Developer Center: PowerActions and Console. The PowerActions section gives access to two subsections, Script Library and Script Execution. These will be the areas where scripts can be imported, ran, and their output can be viewed. There’s also the Console section, which is a minimal PowerShell console, with access to the PowerCLI 11.5 modules, where commands and scripts can be input and ran ad hoc.

Let’s take a more in-depth look at getting started with PowerActions for the vSphere Client.

Introducing the Script Execution Service

There is a new service behind the scenes that gives PowerActions the ability to run PowerCLI scripts and commands directly from the vSphere Client. This service is known as the Script Execution Service (SES). Under the covers, SES is managing a runspace containing PowerShell 6.1 and the collection of modules for PowerCLI 11.5. This runspace is single threaded, stateless, and periodically refreshed. Therefore, we can only run one script at a time and we should not be storing anything to the local filesystem of the runspace. Control of this service can be found in the Fling Appliance Management Interface (FAMI), and is disabled by default.

Setting Up PowerActions

The first step in using PowerActions is to enable SES from the FAMI. This interface is available at port 5490 of your recently deployed or updated vSphere HTML5 Web Client Fling appliance.

Example: Enabling SES

PowerActions makes use of a Content Library to store and reference scripts. We can either create a new Content Library or use an existing one. If you do find yourself having to create a Content Library, ensure that your permissions are configured at the “Global Permissions” level.

In this environment, I’ll need to create a new Content Library. As of PowerCLI 11.5, we can create a Content Library with a single command. Taking some code from the last blog post, What’s New for Content Library Management, we can use the following code to create a new Content Library.

We can now return to the PowerActions tab and start by importing our first script. The next couple sections are going to start with a high-level report then we’ll add some contextual intelligence to take advantage of PowerActions’ more advanced functionalities.

Snapshot Management – Simple Script

Managing snapshots across an entire environment frequently comes up as a pain point. With PowerActions, we can create and import a one-liner script to audit our entire vSphere environment that can be ran by anyone with access to our vSphere Client.

Here’s the body of the one-liner script we’ll be importing, which I’ve named: SnapshotReport_All.ps1

To start, while we’re in the PowerActions tab and Script Library subsection, make sure the desired Content Library has been chosen from the dropdown box on the right-hand side.

Example: Choosing our Content Library

Then, we can begin our import process by clicking “Import”. On the Import Library Item screen, set the Source file to “Local file” and browse to our SnapshotReport_All.ps1 file. The Item name will automatically be populated and we can add notes as needed. Clicking “Import” will complete the process.

The Script Library will now display information about our import script. We will see our name, the Script Type, the version, and the last modified date. Expanding the item will show us even more information, such as the size and the last sync date. Selecting the script will show us the content of the script.

Here’s an example of how the Script Library should display information about the imported Script:
Example: Viewing our imported script

We are now ready to run our script. We can do this directly from the Script Library by clicking the “Run” dropdown and selecting Run.

Once the script has completed running, we’ll see a pop-up containing some basic status information. This pop-up also contains a link back to PowerActions. By browsing to the Script Execution area, we can see the results of whether or not our environment has any snapshots.

Here’s an example of what this process looked like in my environment:
Example: Viewing the output after executing a script

Snapshot Management – Contextually Based

We are now going to take our script a step further by adding some contextual awareness. This gives PowerActions the ability to run the script against specific objects in our vSphere environment. This is done by adding PowerShell parameter blocks to our script.

For our scenario, we only want to return snapshot information from VMs in a specific cluster. Our parameter block will be looking for a strongly typed cluster object.

Here’s what an example script would look like, which will be named: SnapshotReport_Cluster.ps1

Once the above script has been imported, we can run the script against the desired cluster. We will start by changing over to the “Hosts and Clusters” view. We’re going to select a cluster, bring up the “Actions” menu and select “Execute Script”

Example: Executing a script against an object

We’ll then select one of our imported scripts to run. For this scenario, we will select SnapshotReport_Cluster. Note: if you run SnapshotReport_All, you will receive the same results as before since there were no parameter blocks specified.

Example: Choosing our script

Clicking “Ok” will bring us to a Script Parameter screen. We can see that we have our cluster parameter and the input has been configured to be our Management Cluster. Clicking “Ok” again will run our script against the Management Cluster.

Example: Verifying parameters

After a few moments we should see the results pop-up which will take us back to PowerActions. After selecting the Script Executions subsection, we can see the output from our script which has been reduced by two VMs.

Example: Viewing the output after executing a script

Summary

PowerActions is back and available as a new feature within the vSphere Client Developer Center. PowerActions allows us to import scripts to our vSphere environment and execute them with a couple of clicks. This is all thanks to the Script Execution Service, which has been added to version 5 of the vSphere HTML5 Web Client Fling. This blog took a look at setting up PowerActions, creating a Content Library, and importing some scripts to create basic reports. We also added the ability to use one of our scripts in a contextually aware manner, so that PowerActions understands we’re passing in a parameter directly from the user interface!

Let us know how you’re planning to use PowerActions in your environment!

More information about the vSphere HTML5 Web Client Fling can be found here: VMware Flings: vSphere HTML5 Web Client
More information about PowerActions can also be found in the PowerActions_documentation_Fling.pdf, which is available in the dropdown box from the vSphere HTML5 Web Client Fling’s download section.

Comments

111 comments have been added so far

  1. I set up my PowerCLI Publisher Library and imported the example PS1 scripts but it wont run them. Once i click run or clean run a popup appears with Status: Error.

    Would you mind lending me a hand and getting this to run?

    Thanks in advance!

      1. Hi Fabian,

        What is the username and domain name? Are there error details available? Are you able to run script with this user against this VC from PowerCLI on your local machine?

        I tested this in-house with user from another domain and it works for me.

  2. Quickbooks error 12031 can also occur while refreshing the payroll services in QuickBooks. There are several causes behind this error but mainly the pertinent issues are firewall and internet settings. You can fix this error by updating Quickbooks.

  3. QuickBooks error 3371 is typical when a user reconfigures their desktop computer or activates QuickBooks for the first time. Missing or destroying company files could possibly be the source of this problem.

  4. I have read all your article, I locate the substance very fascinating and point by point, you will have all the more intriguing and careful articles to give peruses understanding. Thanks and good luck!

  5. quickbooks install diagnostic toolis considered the top software to maintain the financial sides of the companies. Trusted by professional entrepreneurs, this incredible software has multiple advanced features to make business-related tasks easy. With so many positive reviews, QuickBooks has become a leading software mainly used for generating invoices, tax reports, maintaining the data, reports, financial bills, and so many other things

  6. Thanks for sharing such nice blog post.
    If you are getting bored and want your lonely night turn into joyful, instant get in touch with most reputed escort agency.

  7. Intuit always keeps on surprising its users with different products and services. Turbotax and QuickBooks are among them. It is specialized with some advanced and unique features that can fascinate anyone around

  8. Intuit always keeps on surprising its users with different products and services. Turbotax and QuickBooks are among them. It is specialized with some advanced and unique features that can fascinate anyone around

  9. hey everyone myself jack mosan and i am working in deloitte company as a senior technician and very much fond of reading and writting blogs so if anyone wants to know about QuickBooks won’t open agitates the users with frequent warning pop-ups whenever they want to run the software. “Stuck on the loading screen”, “not responding”, QuickBooks desktop doesn’t start” or “has stopped working” are other names of this issue. Several users reported about it in the past few days that makes it a common problem

  10. At QB Techs we help our customers to grow using business automation tools. Cloud accounting services and making smart guided decisions to save on taxes. Vist QB Techs to know more and how we can help your business to strive.

  11. PRP Platelet Rich Plasma Injections are gaining popularity for a variety of conditions, from muscle & joint injuries as well as rejuvenation of skin, hair follicles and acne. Trusted Platelet Rich Plasma Injections Specialist serving San Diego, CA. Contact us: 858-358-6189

  12. Thank you so much for sharing this post, I have read some of your stuff this past weekend . Personally, I loved your post. I appreciate your work. It was a great informative post. Your articles are useful and informative and links also. I feed glad to read your blog. keep It up.
    If you want to know more information about
    VISIT EXLYAPP Once you can check it.

  13. Thank you so much for sharing this post, I have read some of your stuff this past weekend . Personally, I loved your post. I appreciate your work. It was a great informative post. Your articles are useful and informative and links also. I feed glad to read your blog. keep It up.

  14. Thank you so much for sharing this post, I have read some of your really awesome stuff on this website . Personally, I loved your content. I appreciate your hard work. It was a great informative post.

    Your articles are useful and informative and links also. I feed glad to read your blog. keep It up.

    Thank you so much again – check this out if QuickBooks Running Slow

  15. virtual bookkeeping permits a clerk to work from home rather than genuinely working at a client’s office. Beside the work area, there isn’t a lot of distinction between ordinary accounting administrations and a virtual course of action. A virtual clerk utilizes modernized accounting programming to post monetary exchanges, audit and update explanations and accommodate accounts.

  16. Best white motherboard
    Because of its outstanding design and gaming-specific features, the CVN Z690 Frozen V20 is regarded as the best looking white motherbaord . It can support DDR4 RAM with speeds of up to 4800MHz.

    This motherboard includes an 8-channel audio codec. It aids in the improvement of audio connectivity. It also has Wi-Fi 6 support and a 2.5Gbps LAN chip. Overall, this board is ideal for those looking for a full whitish motherboard with PCB.

  17. Because of its outstanding design and gaming-specific features, the CVN Z690 Frozen V20 is regarded as the best looking white motherbaord . It can support DDR4 RAM with speeds of up to 4800MHz.

    This motherboard includes an 8-channel audio codec. It aids in the improvement of audio connectivity. It also has Wi-Fi 6 support and a 2.5Gbps LAN chip. Overall, this board is ideal for those looking for a full whitish motherboard with PCB.

  18. I read your blog this is very useful for me. Thanks for this informative post and I like your post.
    Well I am Linea Martin and I am a certified bookkeeping expert. I like to help people by sharing the things which I have learned.

  19. How to Fix Intuit QuickBooks Online Login Problems?
    At times, QuickBooks online creates a login problem with chrome and this is a quite common issue. In case the user identifies any such error, then this might arise due to the internet latency issues with a particular internet service provider or the browser that the user normally signs-in to QuickBooks online. The user might not be able to login QuickBooks online due to security enhancements made by Intuit. The account needs to be update to a new intuit account with enhanced security. In this post, we will be talking about the QuickBooks online login problems, its causes, and fixes. Thus, make sure that you read this post till the end. Or you can also consult our team of experts and they will guide you through the process to fix this error instantly. You can give us a call at +1-844-521-0490, and leave the rest on us.

  20. Hi I m Ericad13 ,i m working as seo executive,….
    At times, QuickBooks online creates a login problem with chrome and this is a quite common issue. In case the user identifies any such error, then this might arise due to the internet latency issues with a particular internet service provider or the browser that the user normally signs-in to QuickBooks online. The user might not be able to login QuickBooks online due to security enhancements made by Intuit. The account needs to be update to a new intuit account with enhanced security. In this post, we will be talking about the QuickBooks online login problems, its causes, and fixes. Thus, make sure that you read this post till the end. Or you can also consult our team of experts and they will guide you through the process to fix this error instantly. You can give us a call at +1-844-521-0490, and leave the rest on us.

  21. Thank you for posting the detailed information about the topic . I learned so much from it. I appreciate the detail you went into this topic. for more visit: Teachmore

  22. QuickBooks is a business software program that helps you track your income and expenses, manage your finances, and create a financial plan. To keep your QuickBooks data up-to-date and accurate, it is important to install the QuickBooks desktop software on your system. This guide will walk you through the simple process of install QuickBooks and activating the program.
    https://www.myonepro.com/install-quickbooks/

  23. QuickBooks is a business software program that helps you track your income and expenses, manage your finances, and create a financial plan. To keep your QuickBooks data up-to-date and accurate, it is important to install the QuickBooks desktop software on your system. This guide will walk you through the simple process of install QuickBooks and activating the program.
    Install QuickBooks

  24. Thanks for sharing an amazing post and information. I hope this article will be really helpful for the readers.
    For quick information many small and medium Business owners around the world trust QuickBooks for their bookkeeping and accounting tasks rather than hiring a bookkeeper or any other Bookkeeping in New York. Effective and user-friendly accounting software like QuickBooks has many features that can be handled and operated without much training.

  25. Thanks for sharing an amazing post and information. I hope this article will be really helpful for the readers.
    For quick information many small and medium Business owners around the world trust QuickBooks for their bookkeeping and accounting tasks rather than hiring a bookkeeper or any other Bookkeeping in New York. Effective and user-friendly accounting software like QuickBooks has many features that can be handled and operated without much training.

  26. QuickBooks Error Code 2107 is the error that is related to salaries and direct deposit payment issues usually faced by user while distributing their salaries to its clients. Without a doubt, QuickBooks payroll is a tremendous accounting software loaded with different features and functionalities.

  27. I am very impressed with your write up and information.I had no idea but wow! I have written similar articles several times, please come and have a look!

  28. I am very impressed with your write-up and information. I had no idea but wow! I have written similar articles several times about What is brand awareness?, please come and have a look!

  29. I am very impressed with your write-up and information. I had no idea but wow! I have written similar articles several times about What is brand awareness?, please come and have a look! Thanks for sharing an amazing post and information

  30. I am very impressed with your write-up and information. I had no idea but wow! I have written similar articles several times about What is brand awareness?, please come and have a look! Thanks for sharing an amazing information

  31. QuickBooks software is the most essential software program where it demands more in the universe. But sometimes users getting frustrating when facing QuickBooks error code 1328. This error is a common error that occurs while we updating QuickBooks software.

  32. Awesome.
    Getting started with PowerActions is a great way to streamline your workflow and automate repetitive tasks in a VMware environment. The program’s intuitive interface and robust feature set make it an excellent tool for anyone looking to maximize efficiency and productivity.
    Whether you’re a new user or returning to the program, taking the time to familiarize yourself with the interface and features is well worth the investment, and can help you get the most out of this powerful tool.

  33. DeltaAirlines

    Looking to book an Atlanta To Dublin Delta flight ticket? Here at Delta, we understand the importance of finding affordable and convenient travel options. Atlanta To Dublin Delta Last Minute Flight Booking
    That’s why we offer a variety of Atlanta To Dublin flights, so you can choose the one that best suits your needs. Whether you’re looking for a last-minute deal or want to plan ahead, we have a flight for you. And with our convenient online booking, it’s easy to get started. So what are you waiting for? Book your Atlanta To Dublin Delta flight today!

  34. Learn about the system requirements for QuickBooks Pro 2015 to ensure that your computer is compatible with the software. This guide covers minimum and recommended specifications for both Windows and Mac operating systems, as well as other hardware requirements.

  35. I’m happy to have found such a fantastic blog. To read from top to bottom really impressed me. Light is an essential part of our lives, and we often take it for granted. Refraction of light through a prism is a fascinating phenomenon that has been studied for centuries.

  36. Pamper at Home is a Doorstep women’s beauty service provider that offers the Best salon at home in Noida, Greater Noida & Delhi. for nail extensions, nail art, pedicure, manicure & eyelash extensions, and other beauty services

Leave a Reply

Your email address will not be published. Required fields are marked *