Get-Help cmdlet 會以相同的格式顯示基於註解的說明,這種格式是從 XML 檔案中生成的 Cmdlet 說明內容。使用者可以使用 的所有參數 Get-Help,例如 詳細、 完整、 範例和在線,來顯示以批注為基礎的說明內容。 您也可以為函式和文稿撰寫以 XML 為基礎的說明檔。 若要讓 Get-Help Cmdlet 尋找函式或腳本的 XML ...
All of the lines in a help topic must be contiguous. If a help topic follows a comment that is not part of that topic, there must be at least one blank line between the two. The directives can appear in any order, and some of the directives may appear multiple times. ...
在沒有 param 語句的腳本中,說明主題中最後一個批註與第一個函式宣告之間必須至少有兩個空白行。 如果沒有這些空白行,Get-Help 將說明主題與函式產生關聯,而不是腳本。PowerShell 複製 <# .SYNOPSIS Performs monthly data updates. .DESCRIPTION The Update-Month.ps1 script updates the registry with new ...
不能在远程会话中将 Online 参数与 Get-Help 一同使用。 有关在编写的帮助文章中支持此功能的信息,请参阅 about_Comment_Based_Help、支持联机帮助和为PowerShell Cmdlet 编写帮助。 展开表 类型: SwitchParameter Position: Named 默认值: False 必需: True 接受管道输入: False 接受通配符: False...
Get-HelpGet-MyDisks You can write help for a function using either of the two following methods: Comment-Based Help for Functions Create help using special keywords in the comments. To create comment-based help for a function, the comments must be placed at the beginning, end, or within th...
有关在您编写的帮助主题中支持该功能的信息,请参阅 about_Comment_Based_Help,另请参阅 MSDN(Microsoft Developer Network) Library 中的“如何编写 Cmdlet 帮助”,网址是 http://go.microsoft.c om/fwlink/?LinkID=123415。 -Parameter<string>只显示指定参数的详细说明。允许使用通配符。
两种方式都支持模糊搜索(help/gcm) 我更喜欢用help,这是个更加通用的命令 方式1:get-help(help) PS C:\Users\cxxu_11> help File Name Category Module Synopsis --- --- --- --- New-PSSessionConfigurationFile Cmdlet Microsoft.PowerShell.Core Creates a file that… Test-PSSessionConf...
New-IseSnippet-TitleComment-BasedHelp-Description"A template for comment-based help."-Text"<# .SYNOPSIS .DESCRIPTION .PARAMETER <Parameter-Name> .INPUTS .OUTPUTS .EXAMPLE .LINK #>" 此命令将为 Windows PowerShell ISE 创建一个 Comment-BasedHelp 代码段。 它在用户的代码片段目录$HOME\Documents\Windo...
A comment-based help block. The Param block defining command-line switches. Global variables. Helper routines: Now and Log. A C# source block of the PSService.exe stub. The main routine, processing every command-line switch. Global Settings ...
convert-ps2md.ps1 Converts the comment-based help of a PowerShell script to Markdown. More » convert-md2docx.ps1 Converts Markdown file(s) to .DOCX format. Read more » convert-md2html.ps1 Converts Markdown file(s) to HTML format. Read more » convert-md2pdf.ps1 Converts Mark...