Skip to content

Conversation

@potatoqualitee
Copy link
Member

This pull request updates the Test-DbaKerberos PowerShell function to improve its documentation, clarify its parameter usage, and refactor how check results are handled internally. The main changes include more detailed and accurate descriptions in the function's help section, updated usage examples, the removal of the -Detailed parameter, and a refactor to return check results directly instead of accumulating them in an array.

Documentation and Usability Improvements:

  • Enhanced the .SYNOPSIS and .DESCRIPTION sections to accurately describe the number and categories of checks performed, clarify the output structure, and specify behavior when using -ComputerName versus -SqlInstance.
  • Updated the .EXAMPLE section to show more realistic usage scenarios, including credential handling and output filtering, and added new examples for result formatting and filtering by category.

Parameter and Output Changes:

  • Removed the -Detailed parameter, simplifying the parameter list and focusing on structured output rather than verbose diagnostics.
  • Clarified the purpose of the -Credential parameter and its role in Active Directory and WinRM connections. [1] [2]

Code Structure and Result Handling:

  • Refactored the function to output each check result as a [PSCustomObject] directly, rather than adding it to an internal array, streamlining the output and improving pipeline compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

These updates make the function easier to use, provide clearer guidance to users, and improve the integration of results into PowerShell pipelines.

Expanded and clarified the function's comment-based help, including a more detailed breakdown of diagnostic categories and checks, improved parameter descriptions, and added new usage examples. This improves user understanding of the function's capabilities and expected output.

(do Test-DbaKerberos)
Replaces use of $checkResults.Add() with direct output of PSCustomObject results in the process block. Removes empty begin and end blocks for cleaner code structure.

(do Test-DbaKerberos)
The 'Detailed' parameter was removed from the list of expected parameters in the Test-DbaKerberos unit test. This aligns the test with the current function signature.

(do Test-DbaKerberos)
@potatoqualitee potatoqualitee merged commit ffed690 into development Dec 29, 2025
14 checks passed
@potatoqualitee potatoqualitee deleted the kerbdocs branch December 29, 2025 09:08
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