How to check Help

There are several ways to check the Help for PowerShell cmdlets.

How to check Help

PS> Get-Help Get-ChildItem

or

PS> Get-ChildItem -?

The following is how to use the functions defined by default.
It has the same functions and parameters as Get-Help.
It also has a pagination function.

PS> help Get-ChildItem

or

PS> man Get-ChildItem

Comment-based help for scripts

If your script or function has comment-based help written in it, you can refer to it using the above method.
It is a good idea to describe the comments for those who use the script.

Example

Suppose you have a script like the following.

script.ps1

<#
.SYNOPSIS
    Short description
.DESCRIPTION
    Long description
.EXAMPLE
    PS C:\> <example usage>
    Explanation of what the example does
.INPUTS
    Inputs (if any)
.OUTPUTS
    Output (if any)
.NOTES
    General notes
#>
Write-Host "Hello!"

If you run Get-Help for this script, you will see the following.

PS C:\Users\user\Desktop> Get-Help Script.ps1
 
NAME
    C:\Users\user\Desktop\script.ps1
 
SYNOPSIS
    Short description
 
 
SYNTAX
    C:\Users\user\Desktop\script.ps1 [<CommonParameters>]
 
 
DESCRIPTION
    Long description
 
 
RELATED LINKS
 
REMARKS
    To see the examples, type: "get-help C:\Users\user\Desktop\script.ps1 -examples".
    For more information, type: "get-help C:\Users\user\Desktop\script.ps1 -detailed".
    For technical information, type: "get-help C:\Users\user\Desktop\script.ps1 -full".

YouTube

Click here for a video explanation.