How do you publish your cmdlets help online without duplicating the effort? I created this relatively straight-forward Out-Wiki function which I used to generate all the pages in the QAD cmdlets online reference. Today I finally found time to upload the script to the PowerShell code repository so it is now available for anyone to use.
Just change the name of the PowerShell snapin in the invocation line:
Out-Wiki (Get-Command -PSSnapin Quest.ActiveRoles.ADManagement) “c:\Temp\QADHelp“
And in a minute you have all the wiki pages in MediaWiki (the wikipedia engine) wikitext format generated for you!
The script was inspired by Antonio’s New-HtmlHelp.
You can search for out-wiki in your PowerGUI Script Editor or grab it online here.
Tags: Documentation, Examples, PowerShell, cmdlets, reference
Dmitry, does this script output the mediawiki wikitext, or HTML?
Mediawiki wikitext
Dmitry, are you able to do your entire authoring including page creation in Media Wiki from this tool? What are the benefits of publishing to Media Wiki this way as opposed to using the Media Wiki user interface?
This script takes the help system which cmdlet creators included (basically what you get when you type in CmdletName -? in the command line) and converts it into a series of media wiki files. This basically gives us two forms of documentation: built-in help with which AD cmdlets ship AND online reference – for the price of one.
I have not yet taken it a step further to actually automatically posting the wiki pages. I had to manually copy/paste the generated text. However, Oleg Shevnin actually has some c# code uploading pages to media wiki. I plan to steal that from him and convert to PowerShell – then I will have a complete system with no manual steps.
I will post that new script once I have it.