Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

[Doc]: Get-AzDeploymentWhatIfResult: Wrong default values in Get-Help output #19137

Open SetTrend opened 2 years ago

SetTrend commented 2 years ago

Description

The documentation for the Get-AzDeploymentWhatIfResult returns unsatisfying details about its parameters.

For instance, calling Get-Help 'Get-AzDeploymentWhatIfResult' -Parameter 'ResultFormat' returns:

Default value      None

… which isn't true for an enumeration parameter. And None isn't helpful, too.

A documentation should give full explanation of what to expect from running a Cmdlet. Then, things can be coded without first testing each and every Cmdlet per se.

Please, get clear on default values of Azure PowerShell Cmdlets. This is true for each of them.

dingmeng-xue commented 2 years ago

@SetTrend , thanks for reporting it. Current PowerShell Get-Help doesn't return the Accepted values likes its online doc.

There are 2 possibilities to the default value of optional parameter. One is it is empty/none that user doesn't need to provide any value. Another one is cmdlet implementation set default value by developer but they forgot to describe it on doc. Let us check the implementation.

ghost commented 2 years ago

Thank you for your feedback. This has been routed to the support team for assistance.

SetTrend commented 2 years ago

Thank you, @dingmeng-xue.

I was expecting it's the implementation that's lacking the correct default value, and that you're dragging the Get-Help Cmdlet info here.

I'm looking forward to your findings.