Skip to content

Commit

Permalink
SqlServerDsc: Updated comment-based help (issue dsccommunity#1500)
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jul 7, 2020
1 parent f522d62 commit ebaa493
Show file tree
Hide file tree
Showing 22 changed files with 648 additions and 264 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- SqlServerDsc
- Updated comment-based help according to style guideline throughout
([issue #1500](https://github.com/dsccommunity/SqlServerDsc/issues/1500)).

## [14.1.0] - 2020-07-06

### Removed
Expand Down
16 changes: 16 additions & 0 deletions source/DSCResources/DSC_SqlAGListener/DSC_SqlAGListener.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,22 @@ function Test-TargetResource
return $result
}

<#
.SYNOPSIS
Returns the listener with the specified name for the specified availability group.
.PARAMETER InstanceName
The SQL Server instance name of the primary replica. Default value is 'MSSQLSERVER'.
.PARAMETER ServerName
The host name or FQDN of the primary replica.
.PARAMETER Name
The name of the availability group listener, max 15 characters. This name will be used as the Virtual Computer Object (VCO).
.PARAMETER AvailabilityGroup
The name of the availability group to which the availability group listener is or will be connected.
#>
function Get-SQLAlwaysOnAvailabilityGroupListener
{
[CmdletBinding()]
Expand Down
36 changes: 18 additions & 18 deletions source/DSCResources/DSC_SqlAgentAlert/DSC_SqlAgentAlert.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'

<#
.SYNOPSIS
This function gets the SQL Agent Alert.
This function gets the SQL Agent Alert.
.PARAMETER Name
The name of the SQL Agent Alert.
The name of the SQL Agent Alert.
.PARAMETER ServerName
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
#>
function Get-TargetResource
{
Expand Down Expand Up @@ -91,25 +91,25 @@ function Get-TargetResource

<#
.SYNOPSIS
This function sets the SQL Agent Alert.
This function sets the SQL Agent Alert.
.PARAMETER Ensure
Specifies if the SQL Agent Alert should be present or absent. Default is Present
Specifies if the SQL Agent Alert should be present or absent. Default is Present
.PARAMETER Name
The name of the SQL Agent Alert.
The name of the SQL Agent Alert.
.PARAMETER ServerName
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
.PARAMETER Severity
The severity of the SQL Agent Alert.
The severity of the SQL Agent Alert.
.PARAMETER MessageId
The messageid of the SQL Agent Alert.
The messageid of the SQL Agent Alert.
#>
function Set-TargetResource
{
Expand Down Expand Up @@ -272,25 +272,25 @@ function Set-TargetResource

<#
.SYNOPSIS
This function tests the SQL Agent Alert.
This function tests the SQL Agent Alert.
.PARAMETER Ensure
Specifies if the SQL Agent Alert should be present or absent. Default is Present
Specifies if the SQL Agent Alert should be present or absent. Default is Present
.PARAMETER Name
The name of the SQL Agent Alert.
The name of the SQL Agent Alert.
.PARAMETER ServerName
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
.PARAMETER Severity
The severity of the SQL Agent Alert.
The severity of the SQL Agent Alert.
.PARAMETER MessageId
The messageid of the SQL Agent Alert.
The messageid of the SQL Agent Alert.
#>

function Test-TargetResource
Expand Down
32 changes: 16 additions & 16 deletions source/DSCResources/DSC_SqlAgentOperator/DSC_SqlAgentOperator.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'

<#
.SYNOPSIS
This function gets the SQL Agent Operator.
This function gets the SQL Agent Operator.
.PARAMETER Name
The name of the SQL Agent Operator.
The name of the SQL Agent Operator.
.PARAMETER ServerName
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
#>
function Get-TargetResource
Expand Down Expand Up @@ -90,22 +90,22 @@ function Get-TargetResource

<#
.SYNOPSIS
This function sets the SQL Agent Operator.
This function sets the SQL Agent Operator.
.PARAMETER Ensure
Specifies if the SQL Agent Operator should be present or absent. Default is Present
Specifies if the SQL Agent Operator should be present or absent. Default is Present
.PARAMETER Name
The name of the SQL Agent Operator.
The name of the SQL Agent Operator.
.PARAMETER ServerName
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
.PARAMETER EmailAddress
The email address to be used for the SQL Agent Operator.
The email address to be used for the SQL Agent Operator.
#>
function Set-TargetResource
{
Expand Down Expand Up @@ -230,22 +230,22 @@ function Set-TargetResource

<#
.SYNOPSIS
This function tests the SQL Agent Operator.
This function tests the SQL Agent Operator.
.PARAMETER Ensure
Specifies if the SQL Agent Operator should be present or absent. Default is Present
Specifies if the SQL Agent Operator should be present or absent. Default is Present
.PARAMETER Name
The name of the SQL Agent Operator.
The name of the SQL Agent Operator.
.PARAMETER ServerName
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
The host name of the SQL Server to be configured. Default is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
.PARAMETER EmailAddress
The email address to be used for the SQL Agent Operator.
The email address to be used for the SQL Agent Operator.
#>
function Test-TargetResource
{
Expand Down
63 changes: 62 additions & 1 deletion source/DSCResources/DSC_SqlAlias/DSC_SqlAlias.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ Import-Module -Name $script:resourceHelperModulePath

$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'

<#
.SYNOPSIS
Returns the current state of the SQL Server alias.
.PARAMETER Name
The name of Alias (e.g. svr01\\inst01).
#>
function Get-TargetResource
{
[CmdletBinding()]
Expand All @@ -18,7 +25,7 @@ function Get-TargetResource
$Name
)

$returnValue = @{
$returnValue = @{s
Name = [System.String] $Name
Protocol = [System.String] ''
ServerName = [System.String] $null
Expand Down Expand Up @@ -94,6 +101,33 @@ function Get-TargetResource
$returnValue
}

<#
.SYNOPSIS
Sets the desired state of the SQL Server alias.
.PARAMETER Name
The name of Alias (e.g. svr01\\inst01).
.PARAMETER Protocol
Protocol to use when connecting. Valid values are 'TCP' or 'NP' (Named Pipes).
Default value is 'TCP'.
.PARAMETER ServerName
The SQL Server you are aliasing (the NetBIOS name or FQDN).
.PARAMETER TcpPort
The TCP port the SQL Server instance is listening on. Only used when protocol
is set to 'TCP'. Default value is port 1433.
.PARAMETER UseDynamicTcpPort
The UseDynamicTcpPort specify that the Net-Library will determine the port
dynamically. The port specified in Port number will not be used. Default
value is $false.
.PARAMETER Ensure
Determines whether the alias should be added or removed. Default value is
'Present'.
#>
function Set-TargetResource
{
[CmdletBinding()]
Expand Down Expand Up @@ -198,6 +232,33 @@ function Set-TargetResource
}
}

<#
.SYNOPSIS
Determines the desired state of the SQL Server alias.
.PARAMETER Name
The name of Alias (e.g. svr01\\inst01).
.PARAMETER Protocol
Protocol to use when connecting. Valid values are 'TCP' or 'NP' (Named Pipes).
Default value is 'TCP'.
.PARAMETER ServerName
The SQL Server you are aliasing (the NetBIOS name or FQDN).
.PARAMETER TcpPort
The TCP port the SQL Server instance is listening on. Only used when protocol
is set to 'TCP'. Default value is port 1433.
.PARAMETER UseDynamicTcpPort
The UseDynamicTcpPort specify that the Net-Library will determine the port
dynamically. The port specified in Port number will not be used. Default
value is $false.
.PARAMETER Ensure
Determines whether the alias should be added or removed. Default value is
'Present'.
#>
function Test-TargetResource
{
[CmdletBinding()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'

<#
.SYNOPSIS
Gets the current value of the SQL Server Always On high availability and
disaster recovery (HADR) property.
Gets the current value of the SQL Server Always On high availability and
disaster recovery (HADR) property.
.PARAMETER Ensure
An enumerated value that describes if the SQL Server should have Always On high
availability and disaster recovery (HADR) property enabled ('Present') or
disabled ('Absent').
An enumerated value that describes if the SQL Server should have Always On high
availability and disaster recovery (HADR) property enabled ('Present') or
disabled ('Absent').
*** Not used in this function ***
*** Not used in this function ***
.PARAMETER ServerName
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME.
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
#>
function Get-TargetResource
{
Expand Down Expand Up @@ -68,21 +68,23 @@ function Get-TargetResource

<#
.SYNOPSIS
Sets the current value of the SQL Server Always On high availability and disaster recovery (HADR) property.
Sets the current value of the SQL Server Always On high availability and
disaster recovery (HADR) property.
.PARAMETER Ensure
An enumerated value that describes if the SQL Server should have Always On high
availability and disaster recovery (HADR) property enabled ('Present') or
disabled ('Absent').
An enumerated value that describes if the SQL Server should have Always On high
availability and disaster recovery (HADR) property enabled ('Present') or
disabled ('Absent').
.PARAMETER ServerName
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME.
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
.PARAMETER RestartTimeout
The length of time, in seconds, to wait for the service to restart. Default is 120 seconds.
The length of time, in seconds, to wait for the service to restart. Default is
120 seconds.
#>
function Set-TargetResource
{
Expand Down Expand Up @@ -164,24 +166,25 @@ function Set-TargetResource

<#
.SYNOPSIS
Determines whether the current value of the SQL Server Always On high
availability and disaster recovery (HADR) property is properly set.
Determines whether the current value of the SQL Server Always On high
availability and disaster recovery (HADR) property is properly set.
.PARAMETER Ensure
An enumerated value that describes if the SQL Server should have Always On high
availability and disaster recovery (HADR) property enabled ('Present') or
disabled ('Absent').
An enumerated value that describes if the SQL Server should have Always On high
availability and disaster recovery (HADR) property enabled ('Present') or
disabled ('Absent').
.PARAMETER ServerName
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME.
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME.
.PARAMETER InstanceName
The name of the SQL instance to be configured.
The name of the SQL instance to be configured.
.PARAMETER RestartTimeout
The length of time, in seconds, to wait for the service to restart. Default is 120 seconds.
The length of time, in seconds, to wait for the service to restart. Default
is 120 seconds.
*** Not used in this function ***
*** Not used in this function ***
#>
function Test-TargetResource
{
Expand Down
Loading

0 comments on commit ebaa493

Please sign in to comment.