Home Dashboard Directory Help
Search

Misleading help about CommonParameters for not advanced functions or scripts by Roman Kuzmin


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 773483
Opened: 12/4/2012 9:46:51 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The following script defines a not advanced function and gets help for it:

    <#
    .Synopsis
        Synopsis...
    .Parameter Param1
        Param1...
    #>
    function Test-Help ($Param1)
    {}

    Get-Help Test-Help -Full

Note the help section CommonParameters:

    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer and OutVariable. For more information, see
        about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

This section is misleading because not advanced functions or cmdlets do not
support these parameters. Using these parameters results in errors.
Details
Sign in to post a comment.
Sign in to post a workaround.