Skip to content
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
9541519
Updated comment-based help `.INPUTS` and `.OUTPUTS` sections
johlju Dec 3, 2025
da88e98
Refactor input and output parameter documentation across multiple SQL…
johlju Dec 3, 2025
8adf988
Update input and output parameter documentation in Get-SqlDscServerPe…
johlju Dec 3, 2025
4335ced
Fix formatting in Get-SqlDscServerPermission documentation for Server…
johlju Dec 3, 2025
7567d98
Update .INPUTS and .OUTPUTS sections in Remove-SqlDscDatabase documen…
johlju Dec 3, 2025
82dbeed
Remove unnecessary blank line in .INPUTS section of Remove-SqlDscData…
johlju Dec 3, 2025
55726be
Fix formatting in Test-SqlDscIsRole documentation for .OUTPUTS section
johlju Dec 3, 2025
d4efc5e
Remove unnecessary blank line in .PARAMETER section of Test-SqlDscIsR…
johlju Dec 3, 2025
de04d44
Add OutputType attribute to ConvertTo-RedactedText function
johlju Dec 3, 2025
40154da
Add OutputType attribute to ConvertTo-ManagedServiceType function
johlju Dec 3, 2025
49ab1ba
Add OutputType attribute to Assert-SqlDscLogin function
johlju Dec 3, 2025
a18bd4f
Add OutputType attribute to Import-SqlDscPreferredModule function
johlju Dec 3, 2025
d3a2625
Remove OutputType attribute from Disconnect-SqlDscDatabaseEngine func…
johlju Dec 3, 2025
0788b42
Update output documentation for Install-SqlDscBIReportServer function
johlju Dec 3, 2025
0ca8c28
Refine output documentation for Get-SqlDscAgentOperator function
johlju Dec 3, 2025
a03a44f
Update output documentation for Get-SqlDscManagedComputerService func…
johlju Dec 3, 2025
ea6c702
Update output documentation for Get-SqlDscManagedComputer function
johlju Dec 3, 2025
6fec9c4
Remove unnecessary blank line in Get-SqlDscManagedComputer documentation
johlju Dec 3, 2025
17e8f09
Fix output documentation formatting in Get-SqlDscManagedComputer func…
johlju Dec 3, 2025
5c2bfd2
Update input documentation for Remove-SqlDscRole function
johlju Dec 3, 2025
73c50f3
Update documentation for Test-SqlDscServerPermission function to clar…
johlju Dec 3, 2025
1606c23
Remove unnecessary blank line in Test-SqlDscServerPermission document…
johlju Dec 3, 2025
7dd76f2
Fix formatting and enhance documentation for New-SqlDscDatabase function
johlju Dec 3, 2025
1193ac5
Enhance documentation for ConvertTo-SqlDscFileGroup function to clari…
johlju Dec 3, 2025
331e653
Update output documentation for Uninstall-SqlDscBIReportServer functi…
johlju Dec 3, 2025
f28d97b
Clarify output details for Uninstall-SqlDscReportingService function …
johlju Dec 3, 2025
b6f2a33
Remove unnecessary .NOTES section from Get-SqlDscPreferredModule docu…
johlju Dec 3, 2025
089ab52
Clarify PassThru parameter documentation in Install-SqlDscReportingSe…
johlju Dec 3, 2025
0ec4640
Refine documentation for Test-SqlDscIsDatabasePrincipal function to i…
johlju Dec 3, 2025
edcf812
Fix indentation in documentation for Get-SqlDscAgentAlert function to…
johlju Dec 3, 2025
45a078c
Fix output section indentation in Remove-SqlDscTraceFlag documentatio…
johlju Dec 3, 2025
326ad7a
Fix formatting of PassThru parameter documentation in Repair-SqlDscRe…
johlju Dec 3, 2025
72361c5
Fix formatting and clarify output section in New-SqlDscRole documenta…
johlju Dec 3, 2025
888fc9c
Fix OUTPUTS section in ConvertTo-SqlDscEditionName documentation for …
johlju Dec 3, 2025
00c4c07
Fix INPUTS section in Remove-SqlDscAudit documentation for clarity
johlju Dec 3, 2025
8d05547
Fix formatting in Remove-SqlDscAudit documentation by removing unnece…
johlju Dec 3, 2025
60e03a1
Fix formatting in Repair-SqlDscServer documentation for INPUTS and OU…
johlju Dec 3, 2025
018b2c5
Fix formatting in Test-SqlDscIsLogin documentation by removing unnece…
johlju Dec 3, 2025
cd479e1
Fix formatting in Set-SqlDscStartupParameter documentation for INPUTS…
johlju Dec 3, 2025
cea0730
Fix formatting in Get-SqlDscRole documentation for INPUTS and OUTPUTS…
johlju Dec 3, 2025
0f511b6
Fix formatting in Enable-SqlDscAudit documentation for INPUTS section
johlju Dec 3, 2025
196b7b9
Fix formatting in Set-SqlDscAudit documentation for INPUTS section
johlju Dec 3, 2025
4544ce6
Fix formatting in Grant-SqlDscServerPermission documentation for INPU…
johlju Dec 3, 2025
111a900
Fix formatting in Get-SqlDscDatabasePermission documentation for OUTP…
johlju Dec 3, 2025
e0ad2e6
Fix formatting in Revoke-SqlDscServerPermission documentation for INP…
johlju Dec 3, 2025
1c9efaf
Fix formatting in Remove-SqlDscNode documentation for OUTPUTS section
johlju Dec 3, 2025
2d566d9
Clarify INPUTS section in New-SqlDscAudit documentation to specify SQ…
johlju Dec 3, 2025
a7bfc78
Fix formatting in New-SqlDscAudit documentation by removing extra new…
johlju Dec 3, 2025
f2c347a
Clarify OUTPUTS section in Test-SqlDscIsLogin documentation to specif…
johlju Dec 3, 2025
a4486e2
Clarify OUTPUTS section in Test-SqlDscIsLoginEnabled documentation to…
johlju Dec 3, 2025
4781ad7
Update examples in Set-SqlDscStartupParameter documentation to use co…
johlju Dec 3, 2025
3ad1e85
Add SuppressMessageAttribute and OutputType to Connect-SqlDscDatabase…
johlju Dec 3, 2025
fe60fbc
Fix formatting in Get-SqlDscDatabase documentation by adjusting OUTPU…
johlju Dec 3, 2025
5f81e5b
Clarify OUTPUTS section in Get-SqlDscRSSetupConfiguration documentati…
johlju Dec 3, 2025
2303d55
Remove unnecessary blank line in Get-SqlDscRSSetupConfiguration docum…
johlju Dec 3, 2025
77f228a
Clarify OUTPUTS section in Test-SqlDscAgentAlertProperty documentatio…
johlju Dec 3, 2025
3c6f753
Refactor OUTPUTS section in New-SqlDscAgentAlert documentation for cl…
johlju Dec 3, 2025
88da6e1
Clarify OUTPUTS section in Install-SqlDscReportingService documentati…
johlju Dec 3, 2025
e3dce41
Clarify OUTPUTS section in Repair-SqlDscReportingService documentatio…
johlju Dec 3, 2025
b23b503
Clarify OUTPUTS section in Test-SqlDscDatabaseProperty documentation …
johlju Dec 3, 2025
7cc6c98
Clarify OUTPUTS section in Set-SqlDscAudit documentation to specify r…
johlju Dec 3, 2025
bd2f01e
Clarify OUTPUTS section in multiple scripts to specify that no output…
johlju Dec 4, 2025
d212f5d
Clarify INPUTS section in Set-SqlDscDatabasePermission documentation …
johlju Dec 4, 2025
73e4205
Clarify INPUTS section in Get-SqlDscServerProtocol documentation to s…
johlju Dec 4, 2025
bbd4bcf
Fix formatting of OUTPUTS section in Get-SqlDscTraceFlag documentation
johlju Dec 4, 2025
d98579a
Remove unnecessary blank line before INPUTS section in Get-SqlDscTrac…
johlju Dec 4, 2025
075b09c
Fix formatting of OUTPUTS section in Set-SqlDscAgentAlert documentation
johlju Dec 4, 2025
45b96cb
Add detailed OUTPUTS section to Get-SqlDscTraceFlag documentation
johlju Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ applyTo: "{**/*.ps1,**/*.psm1,**/*.psd1}"
- Comment-based help: SYNOPSIS, DESCRIPTION (40+ chars), PARAMETER, EXAMPLE sections before function/class
- Comment-based help indentation: keywords 4 spaces, text 8 spaces
- Include examples for all parameter sets and combinations
- INPUTS: List each pipeline‑accepted type (one per line) with a 1‑line description. Repeat keyword for each input type.
- OUTPUTS: List each return type (one per line) with a 1‑line description. Repeat keyword for each output type. Must match both `[OutputType()]` and actual returns.
- INPUTS: List each pipeline‑accepted type as inline code with a 1‑line description. Repeat keyword for each input type. If there are no inputs, specify `None.`.
- OUTPUTS: List each return type as inline code with a 1‑line description. Repeat keyword for each output type. Must match both `[OutputType()]` and actual returns. If there are no outputs, specify `None.`.
- .NOTES: Include only if it conveys critical info (constraints, side effects, security, version compatibility, breaking behavior). Keep to ≤2 short sentences.

## Functions
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Updated comment-based help `.INPUTS` and `.OUTPUTS` sections across all public
commands and private functions to comply with DSC community style guidelines
([issue #2103](https://github.com/dsccommunity/SqlServerDsc/issues/2103)).
- `Set-SqlDscDatabaseProperty`
- Updated comment-based help to reference correct enum values.
- Added SQL Server version requirements to version-specific parameter help.
Expand Down
5 changes: 5 additions & 0 deletions source/Private/Assert-Feature.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

Throws an exception if the feature is not supported.

.INPUTS
`System.String[]`

Accepts an array of feature names via the pipeline.

.OUTPUTS
None.
#>
Expand Down
5 changes: 5 additions & 0 deletions source/Private/Assert-ManagedServiceType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@

Asserts that the computer managed service object is of the type Database Engine.

.INPUTS
`Microsoft.SqlServer.Management.Smo.Wmi.Service`

Accepts a SQL Server managed service object via the pipeline.

.OUTPUTS
None.
#>
Expand Down
3 changes: 3 additions & 0 deletions source/Private/Assert-SetupActionProperties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

Throws an exception if the bound parameters are not in the correct state.

.INPUTS
None.

.OUTPUTS
None.

Expand Down
10 changes: 10 additions & 0 deletions source/Private/ConvertFrom-ManagedServiceType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
ConvertFrom-ManagedServiceType -ServiceType 'SqlServer'

Returns the normalized service type name 'DatabaseEngine' .

.INPUTS
`Microsoft.SqlServer.Management.Smo.Wmi.ManagedServiceType`

Accepts a managed service type via the pipeline.

.OUTPUTS
`System.String`

Returns the normalized service type name.
#>
function ConvertFrom-ManagedServiceType
{
Expand Down
6 changes: 2 additions & 4 deletions source/Private/ConvertTo-AuditNewParameterSet.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@
Converts an existing audit object to a parameter set with a custom GUID.

.INPUTS
None

This function does not accept pipeline input.
None.

.OUTPUTS
System.Collections.Hashtable
`System.Collections.Hashtable`

Returns a hashtable of parameters for New-SqlDscAudit.
#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
.PARAMETER Exclude
Array of parameter names to exclude from the formatted output.

.INPUTS
None.

.OUTPUTS
System.String
`System.String`

Returns a formatted string with parameters and their values.

Expand Down
11 changes: 11 additions & 0 deletions source/Private/ConvertTo-ManagedServiceType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,21 @@
ConvertTo-ManagedServiceType -ServiceType 'DatabaseEngine'

Returns the manged service type name for the normalized service type 'DatabaseEngine'.

.INPUTS
`System.String`

Accepts a normalized service type name via the pipeline.

.OUTPUTS
`Microsoft.SqlServer.Management.Smo.Wmi.ManagedServiceType`

Returns the managed service type.
#>
function ConvertTo-ManagedServiceType
{
[CmdletBinding()]
[OutputType([Microsoft.SqlServer.Management.Smo.Wmi.ManagedServiceType])]
param
(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
Expand Down
11 changes: 11 additions & 0 deletions source/Private/ConvertTo-RedactedText.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,21 @@
ConvertTo-RedactedText -Text 'My secret phrase: secret123' -RedactPhrase 'secret123' -RedactWith '----'

Returns the text with the phrases redacted to '----'.

.INPUTS
`System.String`

Accepts text to be redacted via the pipeline.

.OUTPUTS
`System.String`

Returns the redacted text.
#>
function ConvertTo-RedactedText
{
[CmdletBinding()]
[OutputType([System.String])]
param
(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
Expand Down
10 changes: 4 additions & 6 deletions source/Private/Get-AgentAlertObject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
.PARAMETER Name
Specifies the name of the SQL Agent Alert.

.OUTPUTS
Microsoft.SqlServer.Management.Smo.Agent.Alert

Returns the SQL Agent Alert object when an alert with the specified name is found.
.INPUTS
None.

.OUTPUTS
None.
`Microsoft.SqlServer.Management.Smo.Agent.Alert`

When no alert with the specified name is found.
Returns the SQL Agent Alert object when an alert with the specified name is found, or $null if not found.

.EXAMPLE
$serverObject = Connect-SqlDscDatabaseEngine
Expand Down
4 changes: 2 additions & 2 deletions source/Private/Get-AgentOperatorObject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
None.

.OUTPUTS
Microsoft.SqlServer.Management.Smo.Agent.Operator
`Microsoft.SqlServer.Management.Smo.Agent.Operator`

Returns the operator object if found.
Returns the operator object if found, or $null if not found.

.EXAMPLE
$operatorObject = Get-AgentOperatorObject -ServerObject $serverObject -Name 'TestOperator'
Expand Down
2 changes: 1 addition & 1 deletion source/Private/Get-CommandParameter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
None.

.OUTPUTS
System.String[]
`System.String[]`

Returns an array of parameter names that are not excluded.

Expand Down
9 changes: 8 additions & 1 deletion source/Private/Get-FileVersionInformation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@

Returns the version information for the file setup.exe.

.INPUTS
`System.IO.FileInfo`

Accepts a file path via the pipeline.

.OUTPUTS
[System.String]
`System.Diagnostics.FileVersionInfo`

Returns the file version information.
#>
function Get-FileVersionInformation
{
Expand Down
9 changes: 8 additions & 1 deletion source/Private/Get-SMOModuleCalculatedVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@

Returns the calculated version as a string.

.INPUTS
`System.Management.Automation.PSModuleInfo`

Accepts a PowerShell module info object via the pipeline.

.OUTPUTS
[System.String]
`System.String`

Returns the calculated version as a string.
#>
function Get-SMOModuleCalculatedVersion
{
Expand Down
8 changes: 6 additions & 2 deletions source/Private/Invoke-ReportServerSetupAction.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,13 @@
https://learn.microsoft.com/en-us/power-bi/report-server/install-report-server
https://learn.microsoft.com/en-us/sql/reporting-services/install-windows/install-reporting-services

.INPUTS
None.

.OUTPUTS
When PassThru is specified the function will return the setup process exit
code as System.Int32. Otherwise, the function does not generate any output.
`System.Int32`

When PassThru is specified, returns the setup process exit code. Otherwise, no output is generated.

.EXAMPLE
Invoke-ReportServerSetupAction -Install -AcceptLicensingTerms -MediaPath 'E:\SQLServerReportingServices.exe'
Expand Down
3 changes: 3 additions & 0 deletions source/Private/Invoke-SetupAction.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@
.LINK
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

.INPUTS
None.

.OUTPUTS
None.

Expand Down
6 changes: 3 additions & 3 deletions source/Public/Add-SqlDscFileGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
Specifies that the FileGroup should be added without confirmation.

.INPUTS
Microsoft.SqlServer.Management.Smo.FileGroup
`Microsoft.SqlServer.Management.Smo.FileGroup`

FileGroup objects that will be added to the Database.

.OUTPUTS
None
None.

This cmdlet does not generate output by default.

.OUTPUTS
Microsoft.SqlServer.Management.Smo.FileGroup[]
`Microsoft.SqlServer.Management.Smo.FileGroup[]`

When the PassThru parameter is specified, returns the FileGroup objects that were added.

Expand Down
3 changes: 3 additions & 0 deletions source/Public/Add-SqlDscNode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
.LINK
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

.INPUTS
None.

.OUTPUTS
None.

Expand Down
5 changes: 5 additions & 0 deletions source/Public/Add-SqlDscTraceFlag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
Adds the trace flags 4199 and 3226 on the Database Engine instance
'SQL2022' on the server where the command in run.

.INPUTS
`Microsoft.SqlServer.Management.Smo.Wmi.Service`

Accepts a SQL Server managed service object via the pipeline.

.OUTPUTS
None.
#>
Expand Down
6 changes: 3 additions & 3 deletions source/Public/Assert-SqlDscAgentOperator.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
Specifies the name of the operator to check for.

.INPUTS
[Microsoft.SqlServer.Management.Smo.Server]
`Microsoft.SqlServer.Management.Smo.Server`

Accepts a SQL Server server object via the pipeline.

.OUTPUTS
None.

This command does not return anything if the operator exists.

.EXAMPLE
$serverObject = Connect-SqlDscDatabaseEngine -InstanceName 'MyInstance'
$serverObject | Assert-SqlDscAgentOperator -Name 'TestOperator'
Expand Down
9 changes: 9 additions & 0 deletions source/Public/Assert-SqlDscLogin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@

Asserts that the principal 'MyLogin' exists as a login.

.INPUTS
`Microsoft.SqlServer.Management.Smo.Server`

Accepts a SQL Server server object via the pipeline.

.OUTPUTS
None.

.NOTES
This command throws a terminating error if the specified SQL Server
principal does not exist as a SQL server login.
Expand All @@ -33,6 +41,7 @@ function Assert-SqlDscLogin
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('UseSyntacticallyCorrectExamples', '', Justification = 'Because the rule does not yet support parsing the code when a parameter type is not available. The ScriptAnalyzer rule UseSyntacticallyCorrectExamples will always error in the editor due to https://github.com/indented-automation/Indented.ScriptAnalyzerRules/issues/8.')]
[CmdletBinding()]
[OutputType()]
param
(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
Expand Down
3 changes: 3 additions & 0 deletions source/Public/Complete-SqlDscFailoverCluster.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
.LINK
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

.INPUTS
None.

.OUTPUTS
None.

Expand Down
3 changes: 3 additions & 0 deletions source/Public/Complete-SqlDscImage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@
.LINK
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

.INPUTS
None.

.OUTPUTS
None.

Expand Down
9 changes: 8 additions & 1 deletion source/Public/Connect-SqlDscDatabaseEngine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,18 @@

Connects to the default instance on the local server using the SQL login 'sa'.

.INPUTS
None.

.OUTPUTS
`[Microsoft.SqlServer.Management.Smo.Server]`
`Microsoft.SqlServer.Management.Smo.Server`

Returns the SQL Server server object.
#>
function Connect-SqlDscDatabaseEngine
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('UseSyntacticallyCorrectExamples', '', Justification = 'Because the rule does not yet support parsing the code when the output type is not available. The ScriptAnalyzer rule UseSyntacticallyCorrectExamples will always error in the editor due to https://github.com/indented-automation/Indented.ScriptAnalyzerRules/issues/8.')]
[OutputType([Microsoft.SqlServer.Management.Smo.Server])]
[CmdletBinding(DefaultParameterSetName = 'SqlServer')]
param
(
Expand Down
9 changes: 8 additions & 1 deletion source/Public/ConvertFrom-SqlDscDatabasePermission.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@
Returns an object of `[Microsoft.SqlServer.Management.Smo.DatabasePermissionSet]`
with all the permissions set to $true that was part of the `[DatabasePermission]`.

.INPUTS
`DatabasePermission`

Accepts a DatabasePermission object via the pipeline.

.OUTPUTS
[Microsoft.SqlServer.Management.Smo.DatabasePermissionSet]
`Microsoft.SqlServer.Management.Smo.DatabasePermissionSet`

Returns a database permission set object.
#>
function ConvertFrom-SqlDscDatabasePermission
{
Expand Down
Loading
Loading