Main | Contact | Blog | Documentation

PowerShell Framework

The project dedicated to empowering your PowerShell scripting.

Set-PSMDParameterHelp

SYNOPSIS

Sets the content of a CBH parameter help.

SYNTAX

Set-PSMDParameterHelp [-Path] <String> [-CommandName] <String> [-ParameterName] <String> [-HelpText] <String>
 [-DisableCache] [<CommonParameters>]

DESCRIPTION

Sets the content of a CBH parameter help. This command will enumerate all files in the specified folder and subfolders. Then scan all files with extension .ps1 and .psm1. In each of these files it will check out function definitions, see whether the name matches, then update the help for the specified parameter if present.

In order for this to work, a few rules must be respected:

EXAMPLES

EXAMPLE 1

Set-PSMDParameterHelp -Path "C:\PowerShell\Projects\MyModule" -CommandName "*" -ParameterName "Foo" -HelpText @"
This is some foo text
For a truly foo-some result
"@

Scans all files in the specified path.

PARAMETERS

-Path

The base path where all the files are in.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CommandName

The name of the command to update. Uses wildcard matching to match, so you can do a global update using “*”

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParameterName

The name of the parameter to update. Must be an exact match, but is not case sensitive.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HelpText

The text to insert.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableCache

By default, this command caches the results of its execution in the PSFramework result cache. This information can then be retrieved for the last command to do so by running Get-PSFResultCache. Setting this switch disables the caching of data in the cache.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES