Summary: Learn how to use Windows PowerShell to hide a parameter from IntelliSense.
How can I use Windows PowerShell to hide a parameter from IntelliSense?
Introduced in Windows PowerShell 4.0, you can specify the DontShow attribute
for the [parameter()] type to hide that parameter from IntelliSense:
Function Test-Something {
[cmdletbinding()]
Param (
[parameter(DontShow)]
$HiddenParameter,
[parameter()]
$Computername,
[parameter()]
$NewValue
)
}
Cycling through parameters will not show $HiddenParameter:
PS C:\> Test-Something - #Tab through parameters