Welcome to Powergui.org - an open source community for Windows Powershell

PowerGUI.org PowerGUI.org and blogs

Forums » PowerGUI User Discussions

Thread: Advice how to create cmdlets with full inegration in PowerGUI

This question is answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 3 - Pages: 1 - Last Post: Mar 26, 2008 4:03 AM by: AGrueninger
AGrueninger

Posts: 2
Registered: 3/25/08
Advice how to create cmdlets with full inegration in PowerGUI
Posted: Mar 25, 2008 12:10 PM
 
  Click to reply to this thread Reply

Hi Powergui team

I managed to create script nodes which use my own cmdlets written in C#. The scripts using the cmdlets work without any problems in powershell and powergui.
When I create a node, I have to select a cmdlet but I am not able select my own cmdlets. They are registered and available because the script nodes are working. Are there any decorations necessary or does exist a library to get this extended functionality? Or is the registration wrong?
It must be possible for non-powergui cmdlets. Last week I installed the VMWare VI-Toolkit and the cmdlets of the VI Toolkit are visible in the drop down list "Command:" of the properties of the new node. But not my own.

So the question is: is there any documentation available how to write cmdlets in C# to get the full support of powergui?


Keep up the good work.

I am very eager to integrate my own management tools in powergui. And to publish them of cyourse.



Andreas




KirkAMunro


Posts: 822
Registered: 3/20/07
Re: Advice how to create cmdlets with full inegration in PowerGUI
Posted: Mar 25, 2008 1:12 PM   in response to: AGrueninger
 
  Click to reply to this thread Reply

Hi Andreas,

I'm curious, do you have a help file created for your cmdlets (generated using the Cmdlet Help Editor which can be found here: http://www.wassimfayed.com/PowerShell/CmdletHelpEditor.zip)?

Also, when you try to create a node are you looking for a cmdlet that uses the verb Get?  Because those are the only cmdlets that are allowed in non-script node.

And lastly, is your snapin loaded through the File | Libraries dialog (it will be checked if it is loaded)?

Thanks,

--
Kirk Munro [MVP]
Poshoholic
http://www.poshoholic.com

Kirk Munro [MVP]
Poshoholic

My blog: http://poshoholic.com
Follow me on Twitter: http://twitter.com/poshoholic
Dmitry Sotnikov


Posts: 1,151
Registered: 12/1/06
Re: Advice how to create cmdlets with full inegration in PowerGUI
Posted: Mar 25, 2008 1:14 PM   in response to: AGrueninger
 
  Click to reply to this thread Reply

Andreas,

The trick is to suppliment your cmdlet with help information.

PowerGUI relies on the PowerShell help system for information on available cmdlets, their parameters, descriptions, and so on.

So basically make sure that Get-Help works for the cmdlets you create and you will be fine.

You can use this free tool from Microsoft to create help: http://blogs.msdn.com/powershell/archive/2007/05/08/cmdlet-help-editor-tool.aspx

Once Get-Help works natively, force PowerGUI to reindex help by opening File/PowerShell Libraries and de-selecting/re-selecting your snapin.

Dmitry


AGrueninger

Posts: 2
Registered: 3/25/08
Re: Advice how to create cmdlets with full inegration in PowerGUI
Posted: Mar 26, 2008 4:03 AM   in response to: AGrueninger
 
  Click to reply to this thread Reply

Dmitry and Kirk,

It works flawlessly if a help file exists.

Thanks a lot

Andreas




Legend
MVP: 2501 + pts
Guru: 2001 - 2500 pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums