简体   繁体   English

在Visual Studio中编辑二进制PowerShell模块。 如何为cmdlet添加多行注释?

[英]Editing binary PowerShell module in Visual Studio. How to add multi-line comments for cmdlets?

I'm taking over someone else's binary PowerShell module for our products. 我要为我们的产品接管别人的二进制PowerShell模块。 I'm new to VS, but not to PowerShell. 我是VS的新手,但不是PowerShell。

I'm trying to find info on how to add comment-based help to the cmdlets, but not finding the syntax for doing so within Visual Studio (in my case, 2013 Premium). 我正在尝试查找有关如何向cmdlet添加基于注释的帮助的信息,但没有在Visual Studio(以我为例,2013 Premium)中找到这样做的语法。 My BingFoo is failing, and I'm not coming up with anything in online searches. 我的BingFoo失败了,我在网上搜索中没有提出任何建议。 Is anyone aware of a site/article/page that shows how to do it? 是否有人知道显示该操作方法的网站/文章/页面?

I also need to put comments above each parameter. 我还需要在每个参数上方添加注释。 For example, I want 例如,我想要

   (some syntax here)
   [Parameter(Mandatory = false)]
   public string WiFi { get; set; }

to result in the following in the cmdlet when viewing in PowerShell: 在PowerShell中查看时在cmdlet中导致以下内容:

   # Whether this subnet is on Wi-Fi
   [Parameter(Mandatory = false)]
   [string] $WiFi

Several people told me it can't be done. 几个人告诉我这不可能完成。 So I ended up just using the PowerShell Cmdlet Help Editor from Codeplex. 因此,我最终只使用了来自Codeplex的PowerShell Cmdlet帮助编辑器 Made life a LOT easier. 使生活变得更加轻松。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM