📜  PowerShell Get-Help(1)

📅  最后修改于: 2023-12-03 15:18:40.550000             🧑  作者: Mango

PowerShell Get-Help

PowerShell Get-Help is a cmdlet used to retrieve help information about other cmdlets, functions, scripts, and modules in PowerShell. It's widely used by PowerShell developers to find out how to use the commands correctly.

Syntax
Get-Help [-Name <string[]>] [-Parameter <string[]>] [-Functionality <string[]>] [-Category <string[]>] [-Component <string[]>] [-Role <string[]>] [-Detailed] [-Examples] [-Full] [-Online] [-ShowWindow] [<CommonParameters>]
Parameters

Here are the details of some commonly used parameters:

  • Name: Specifies the name of the command or module for which to get help.
  • Parameter: Specifies the parameter name(s) for which to get help.
  • Functionality: Specifies the functionality that the command or module provides.
  • Category: Specifies the category of the command or module.
  • Component: Specifies the component that the command or module is a part of.
  • Role: Specifies the role of the user who is running the command or module.
  • Detailed: Shows a detailed description of the command or module.
  • Examples: Shows examples of how to use the command or module.
  • Full: Shows the full help information for the command or module.
  • Online: Shows the online help for the command or module.
  • ShowWindow: Displays the help in a separate window.
Usage

Some examples of using the Get-Help cmdlet are:

# Get help for Get-ChildItem cmdlet
Get-Help Get-ChildItem

# Get help for a specific parameter of a cmdlet
Get-Help Get-ChildItem -Parameter Path

# Search for available modules
Get-Help *Module*

# Get online help for a module
Get-Help Az –Online
Markdown code snippets

To display code snippets in Markdown format, you can use the following syntax:

```powershell
# Your PowerShell code here

For example:

```powershell
# Get help for Get-ChildItem cmdlet
Get-Help Get-ChildItem

This will display the code snippet as follows:

# Get help for Get-ChildItem cmdlet
Get-Help Get-ChildItem