I am developing a thick user interface diagnostic tool if it has direct integration with PowerShell

My team and I are developing a diagnostic testing tool for our next product. The testing tool will use the request / response API and display asynchronous events. As part of our diagnostic toolkit, we will also provide cmdlets for the entire product API.

Is it worth embedding PowerShell execution in a tool interface? What are other development teams doing?

Scripts can run autonomously in any window or PowerShell tool. From the point of view of the user, they will be able to run scripts from our user interface. And since the user interface can control the same devices on which the scripts operate, it brings some unity to the execution of the script and monitoring the results. Implementing a run script brings more work to the project, and I'm not sure how we want to handle the display of script results.

Can most PowerShell users run their scripts from their shells or in tools that come from their product suppliers? Please note: our diagnostic tool will not automatically generate scripts for users, as some Microsoft tools do (this may be useful for inexperienced PowerShell users, but we expect that most scripts will be quite simple, for example, executing a command on a number of devices).

+6
powershell
source share
3 answers

Fortunately, embedding the PowerShell core and executing commands / scripts and getting the results back is pretty trivial. However, I'm not sure if the script is the one where I would include PowerShell. You ask if people prefer to run scripts from their own shells or from an instrumental vendor environment. I can't speak for everyone, but the shells and editors that I use support some great features for debugging, code folding, syntax highlighting, a few spaces, etc. I’m not sure that you will want to complete efforts to provide similar opportunities,

One reason for enabling PowerShell is to run the same PowerShell cmdlets as part of your kernel for diagnostics and monitoring. Thus, you do not need to duplicate functionality between your diagnostic tool tool engine and the cmdlets that your clients use to automate. Does the code that you use for diagnostics and monitoring in the application seem to be different from the code in the cmdlets? Or is there common code shared between the application and the cmdlets?

Another reason to enable PowerShell is to allow the script itself to be a script, but this does not match your script.

Another reason to enable PowerShell is because you are deploying a new host, that is, you provide some unique editing or shell features. Some applications that do this are PowerGUI (which lets you run IIRC scripts) and PowerShell Plus.

Another reason I included PowerShell in the application was because I knew that I could get certain results with much less code than the equivalent C # code. This is a weaker reason, and I probably would not have done it in a commercial application, but I used it for one-time programs.

+5
source share

I agree with Jaykul and Keith Hill - the answer is yes.

There are several approaches. But in general, I would recommend that you: a) create key cmdlets as part of the user interface for your application, and b) you create a graphical interface on top of PowerShell (just like the Exchange team did.

This follows Microsoft (all applications must have a PowerShell interface), which is also used by other users (for example, VMware and even Symantec use PowerShell in their applications.

Creating cmdlets (and possibly a provider) is quite simple - the excellent cmdlet constructor was recently released there (see http://blogs.msdn.com/powershell/archive/2009/10/16/announcing-open-source-powershell- cmdlet-and-help-designer.aspx ) for this tool.

Hope this helps!

+2
source share

Yes, the main reason I would think about embedding PowerShell in this script is because your user interface could generate PowerShell scripts for user actions in the user interface so that they can see what is happening and easily recognize how to automate it. This will require developing a PowerShell-based user interface from the very beginning ... so it sounds to me as if you'd better just provide the cmdlets and samples;)

0
source share

All Articles