Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.14k stars 3.77k forks source link

[Az.DesktopVirtualization] Get-AzWvdApplication has inappropriate parameters from auto generation #21370

Open JimMoyle opened 1 year ago

JimMoyle commented 1 year ago

Description

If you run help for the cmdlet you have a parameters form the REST API which are not correct for PowerShell:

help Get-AzWvdApplication -Full

[-Break] [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-Proxy

] [-ProxyCredential ] [-ProxyUseDefaultCredentials] These are undocumented and have unknown function, but are present due to auto generation. ### Issue script & Debug output ```PowerShell N/A ``` ### Environment data ```PowerShell Name Value ---- ----- PSVersion 7.3.3 PSEdition Core GitCommitId 7.3.3 OS Microsoft Windows 10.0.22621 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0 ``` ### Module versions ```PowerShell ModuleType Version PreRelease Name ExportedCommands ---------- ------- ---------- ---- ---------------- Script 2.12.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…} Script 3.1.1 Az.DesktopVirtualization {Disconnect-AzWvdUserSession, Expand-AzWvdMsixImage, Get-AzWvdApplication, Get-AzWvdApplicationGroup…} ``` ### Error output ```PowerShell N/A ```
isra-fel commented 1 year ago

This behavior applies to all the generated cmdlets. Let me transfer it to autorest repo. Thanks for reporting :)

dolauli commented 1 year ago

@JimMoyle We already hid these parameters (marked as DontShow in PowerShell) from our online docs, since these parameters are not related to the function of the cmdlet. And you get those parameters when you run get-help xxxx -Full is because PowerShell does not provide a good way to hide these DontShow Parameters. -Break is for debug purpose [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] is designed to add handlers in the httpPipe. Generally speaking, customers should not use them. And currently we use them for playback test. [-Proxy] [-ProxyCredential ] [-ProxyUseDefaultCredentials] is designed to set proxy in cmdlet level.

ghost commented 1 year ago

Hi @JimMoyle. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

isra-fel commented 1 year ago

@dolauli please follow up with the followings: