Welcome to MSDN Blogs Sign in | Join | Help

Documentation One Liner

I'm constantly amazed and delighted by what people are able to do with a single line of PowerShell. The System Center Virtual Machine Manager (SCVMM) team just released a PowerShell Cmdlet Reference HERE. That is cool – it allows anyone to go take a look at their Cmdlets to either get a better idea for what SCVMM does (or how it does it) or to learn from how they did their cmdlets. I encourage everyone that ships cmdlets to do something similar. That might seem like a big ask until you look at how they produced their documentation:

Get-Command -PSSnapin VirtualMachineManagerSnapin | Sort-Object Noun, Verb | Get-Help -detailed > VMMHelpTopicsSortedNounVerb.txt

They then imported that into WORD and added an Introduction and Table of Contents.

Simply amazing! It's actually obvious once you see it but I hadn't thought about this before. That is the power of having lots of smart people sharing their ideas.

So what are you waiting for? Take a minute and produce a Cmdlet Reference for your product and post it on the Web. (Put a link to the document as a comment to this thread so people can find it.) Also - have you got a great script or one-liner that you are using but haven't shared with the world yet? Improve the world by sharing it.

Cheers!

Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

 

Published Saturday, September 15, 2007 3:23 PM by PowerShellTeam

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# MSDN Blog Postings » Documentation One Liner

Saturday, September 15, 2007 1:22 PM by MSDN Blog Postings » Documentation One Liner

# re: Documentation One Liner

Sunday, September 16, 2007 3:26 AM by Andrew Tearle

# re: Documentation One Liner

This is similar to the way I created the cmdlet quick reference in the early User Guides.  At the heart of the script was pulling the cmdlet definition out of the CmdletInfo object and pulling the Synopsis from the help.  That way I wouldn't need to do anything by hand, just get a new build and rebuild the table automatically!   It wasn't quite a one liner in the end as I built a complicated html table, but it started like this:

<code>

PS> get-command -type cmdlet |ft name,definition,@{ l = "Synopsis"; e = {(get-he

lp $_.name ).synopsis }}

</code>

Monday, September 17, 2007 5:03 PM by PowerShellTeam

# re: Documentation One Liner

It's not a one-liner but we posted the script we used to address the same issue here: http://blogs.vmware.com/vipowershell/2007/09/new-htmlhelp.html

Wednesday, September 19, 2007 12:29 PM by Antonio Dias

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker