Home Dashboard Directory Help

Add PowerShell tab and examples to .NET reference pages in MSDN by June Blender



Sign in
to vote
Type: Suggestion
ID: 1351032
Opened: 5/20/2015 10:16:32 AM
Access Restriction: Public


PowerShell users often read .NET reference pages in MSDN. It's all but required, because Get-Help doesn't describe object members. However, in the Examples section of .NET reference pages, there are no PowerShell examples; not even a PowerShell tab.

MSDN says they cannot demonstrate a demand for PowerShell examples. I'd like to use this feature request to demonstrate the demand.
Sign in to post a comment.
Posted by Jeremy7777 on 10/1/2015 at 11:54 AM
I think this to myself EVERY SINGLE TIME I visit MSDN. Definitely necessary given the expansion and popularity of Powershell. If you can get internal teams to write thousands of cmdlets, you can get a few interns to start updating MSDN documentation. (or better yet, script it!)
Posted by s.mcknight on 6/24/2015 at 10:20 AM
Yes....examples....in mass...for learning...and improved scripting.
Posted by Cookie.Monster on 5/31/2015 at 6:13 AM
A suggestion - If you come up with tooling that can translate your C# examples to PowerShell, even if just for an initial take that you can tweak further, I would highly recommend releasing this to the community : )

While the discussion at hand is MSDN examples, wouldn't it be nice to take the myriad third party C# examples and snippets online and convert them to PowerShell?

Probably wouldn't be perfect, and might not produce 'best practice' PowerShell material, but tooling like this would be incredibly valuable for folks who write modules around .NET libraries - it would also save you a boatload of time if you plan to execute on this and provide PowerShell examples in MSDN : )

Posted by crobe.3 on 5/30/2015 at 4:04 AM
I have spent many hours, collectively speaking, either translating from an exampled language to PowerShell or trial and error making my way through. This would be a huge benefit to everyone, especially novice level PowerShell users like myself who are striving to learn.
Posted by Stéphane vg on 5/27/2015 at 2:02 AM
Another type of example could be here I guess:


Where the help is about "Windows Powershell Concepts - Cmdlet Parameter Sets", the examples provided for a powershell functionality, are written in C# .
Posted by mike.mcse on 5/26/2015 at 4:25 AM
I'm a scripter, only a scripter. My only interest in reference pages is to find the PowerShell usage of .NET and COM objects.
I find it a constant annoyance to have to translate VB and C++ examples into PowerShell, it's a real waste of my valuable time. Why wouldn't Microsoft eat its own dogfood and endorse PowerShell properly with a PowerShell worked example on every page?

IMHO, VB/Wscript/VBA should have been taken out the back, shot and buried in an unmarked grave years ago.

Just my two pennies worth. Which would be worth a lot more if I wasn't wasting my time "transcoding" back into PowerShell!!!
Posted by Nickolaj Andersen on 5/22/2015 at 7:22 AM
PowerShell examples would be really helpful!
Posted by George Steiger on 5/22/2015 at 5:58 AM
Would be great to have examples
Posted by CogentCoder on 5/21/2015 at 6:21 PM
I would like to see examples of SMO.
Posted by Joey Aiello [MSFT] on 5/21/2015 at 11:29 AM
Wow! What a phenomenal response, everyone! (BladeFireLight even got posted well-crafted I CAN...SO THAT statement down there.) As usual, I can't promise anything, but I will DEFINITELY be following up with the appropriate people to see what can be done about this.

Will, I know we'd definitely like to take contributions for our documentation in the longer-term, but we'd like to do it in a way that is sustainable and automated.

As a starting point, does anyone have any particular .NET classes that they feel would MOST benefit from having PowerShell examples? Or a large subset that would LEAST benefit?
Posted by Yonderboy1 on 5/21/2015 at 10:44 AM
This would help me greatly, knowing Powershell much better than .NET. Rather than looking for community example, straight from the horse's mouth would be great.
Posted by Lee Cashion on 5/21/2015 at 6:43 AM
Yes. please. Translating c# or VB into PowerShell takes too long and doesn't always work.
Posted by Jaap Brasser on 5/21/2015 at 12:55 AM
I would very much like to see this as well, at the moment either you reverse engineer the C# code to make it work for PowerShell or have to rely on the PowerShell community and just hope that someone blogged the PowerShell example.

It would be great if this would be available on MSDN instead.
Posted by Jay.Armstrong on 5/20/2015 at 8:38 PM
If devops is where we are going then PowerShell needs the same attention as C# and VB.
Posted by William E. Anderson on 5/20/2015 at 8:32 PM
I too would like to see examples made available for PowerShell. Perhaps MSFT would be willing to consider working with the community to develop submissions?
Posted by Jason Milczek on 5/20/2015 at 6:44 PM
This is a must for toolmakers et al, please add. I appreciate your consideration.
Posted by Jeffrey Bernt on 5/20/2015 at 6:29 PM
Everything I do at work, (and some stuff at home) relies on PowerShell being available. I can't get my team to use it since there are no examples! We need this.
Posted by HalR on 5/20/2015 at 6:22 PM
Amazing that we have to have this conversation at all! PowerShell is here to stay, and it's deeply rooted to .net. Please do this!
Posted by MSFTW on 5/20/2015 at 5:53 PM
Many C# examples are usually easy to translate/transpose to PowerShell, but the language-differences make some classes hard to derive obvious PowerShell equivalents from (event-driven examples, wrapper classes with out parameters, asynchronous patterns, etc.).

PowerShell examples would be awesome!
Posted by Kieran Jacobsen on 5/20/2015 at 3:42 PM
Whilst I can usually convert C# examples to PowerShell in my head, it would be nice to see more PowerShell examples!

PowerShell developers are developers too, yet MSDN doesn't treat us as equal with the others.
Posted by jyao on 5/20/2015 at 2:36 PM
LOL, totally agree with JRRemillard. MS sometimes has very weird decision-making logic. Believe it or not, these days, MS can hardly attract most of the smartest people, and thus you will not see many smart decisions from MS.
Posted by BladeFireLight on 5/20/2015 at 12:54 PM
ICAN read PowerShell examples on the MSDN library SO THAT when I need to use .NET in PowerShell I have a starting point that does not requires I spend all day searching the internet.
Posted by MNscripter on 5/20/2015 at 12:15 PM
Can't demonstrate a demand? So I guess that means that no one actually reads the Additional Feedback when someone votes "This wasn't helpful" on the MSDN pages, because I've been commenting, requesting PowerShell examples.
Posted by JRRemillard on 5/20/2015 at 10:28 AM
Very Odd! Not seeing a demand. There is no powershell references so how would you see the demand. There is however a requirement, since EVERYTHING Microsoft is now producing at a server / workstation / SQL ETC... is managed, deployed, or updated with Powershell. This would be great to have.
Sign in to post a workaround.
Posted by Jim_B on 5/23/2015 at 11:12 PM
I think if you are being forced to resort to the .NET framework in a script, you should be demanding more cmdlets, rather than trying to stuff in more complex workarounds in .net
Posted by Dave PC on 5/21/2015 at 5:43 AM
I grew up in the DecSystem-10, DecSystem-20 and OpenVMS methods of DCL help.
What do you do with the current Help? Keep it. This scripting technology now has matured to a point where it's mission critical for advancement, positioning and posturing in the IT industry as a whole. Yes, MS has the budget and PowerShell has the value for making this so.
Posted by Dave PC on 5/21/2015 at 3:34 AM
There really is no work around if you've been in this situation before. After hitting this site and
muttling through the c# or vb tabs, by it not being here, the next step is back out to the internet.