Skip to content

Comments

Add detailed .OUTPUTS documentation#10072

Merged
potatoqualitee merged 5 commits intodevelopmentfrom
output
Dec 30, 2025
Merged

Add detailed .OUTPUTS documentation#10072
potatoqualitee merged 5 commits intodevelopmentfrom
output

Conversation

@potatoqualitee
Copy link
Member

Adds .OUTPUTS documentation to several PowerShell command files, ensuring that users have clear, accurate descriptions of what each function returns. It also enhances the internal help system to display this new information. The changes improve usability and maintainability by making output types and properties explicit for each command.

Help System Enhancements

Help Rendering Improvements:

  • Updated Get-DbaHelp to display the .OUTPUTS section in the rendered help output, if present.
  • Modified help parsing logic to extract the .OUTPUTS section from command help and make it available for display.

Added a comprehensive .OUTPUTS section to Add-DbaAgDatabase, documenting the default and additional properties of the returned AvailabilityDatabase objects. This includes descriptions and data types for each property, clarifies which are shown by default, and notes that all SMO properties are available via Select-Object.
Replaces the previous JSON output format example with detailed PowerShell .OUTPUTS comment-based help examples. Adds multiple scenarios, guidelines for documenting output types and properties, and clarifies how to describe default and conditional outputs for PowerShell commands.
Get-DbaHelp now includes an Outputs section in its rendered documentation if output information is available. This improves the clarity of command documentation by displaying expected return values.
(do Add-DbaAgListener)
@potatoqualitee potatoqualitee merged commit a0c677b into development Dec 30, 2025
2 checks passed
@potatoqualitee potatoqualitee deleted the output branch December 30, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant