You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can we hide obsolete or internal-use-only helper parameters from syntax diagrams? #7868
Format-Hex's -Raw switch is obsolete in PowerShell Core - it has no effect whatsoever and is only retained for backward compatibility with Windows PowerShell v5.1 (backstory here).
(As an aside: This fact is not documented, nor was the parameter's (fairly obscure) original purpose ever documented for v5.1.)
Explaining the obsolescence in the documentation will go a long way, but I wonder if there is/should be a mechanism to hide a parameter from the syntax diagram, so that its continued, pointless presence doesn't cause confusion / isn't a distraction when you run Format-Hex -? or Get-Command Format-Hex -Syntax, for instance.
The ability to hide parameters would in general also be useful for helper parameters that are solely meant to be used by a given cmdlet itself in recursive invocations, for instance.
•After a discussion with Francisco Gamino (@Francisco-Gamino) and Joey Aiello (@joeyaiello), it was decided to make the Raw parameter No-op. Going forward all of the output will be displayed with a true representation of numbers that includes all of the bytes for its type (what the Raw parameter was formally doing). For example, [Int32]170 passed to Format-Hex would have previously displayed only "AA". Now it will display "AA 00 00 00".
What, specifically, will the effects of using System.ObsoleteAttribute be to PowerShell users?
Will it hide the parameter from the syntax diagrams, as suggested?
changed the title [-]Can we hide obsolete parameters from syntax diagrams?[/-][+]Can we hide obsolete or internal-use-only helper parameters from syntax diagrams?[/+]on Apr 27, 2023
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
Activity
vexx32 commentedon Sep 26, 2018
Something fairly simple should be in place for this. An
[Obsolete()]parameter attribute, perhaps?iSazonov commentedon Sep 27, 2018
I'll try it today.
For reference #3320
mklement0 commentedon Sep 28, 2018
Thanks for taking this on, Ilya (@iSazonov).
What, specifically, will the effects of using
System.ObsoleteAttributebe to PowerShell users?Will it hide the parameter from the syntax diagrams, as suggested?
iSazonov commentedon Sep 28, 2018
#7877 doesn't hide the parameter from the syntax diagrams. If #7877 will be accepted it will allow to resolve the issue on next step.
[-]Can we hide obsolete parameters from syntax diagrams?[/-][+]Can we hide obsolete or internal-use-only helper parameters from syntax diagrams?[/+]microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.