diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bc36d13f2..0a66b3f359 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Integration_Test_Resources_ReportingServices - Integration_Test_Resources_ReportingServices_dbatools - Update build script path in integration tests. + - Fix style formatting in all PowerShell script files. - SqlSetup - Fixed issue with AddNode where cluster IP information was not being passed to setup.exe ([issue #1171](https://github.com/dsccommunity/SqlServerDsc/issues/1171)). diff --git a/source/Classes/020.SqlAudit.ps1 b/source/Classes/020.SqlAudit.ps1 index 6bd95acf07..906ca84d8b 100644 --- a/source/Classes/020.SqlAudit.ps1 +++ b/source/Classes/020.SqlAudit.ps1 @@ -395,15 +395,15 @@ class SqlAudit : SqlResourceBase { # Look for file audit properties not in desired state $fileAuditProperty = $properties.Keys.Where({ - $_ -in @( - 'Path' - 'MaximumFiles' - 'MaximumFileSize' - 'MaximumFileSizeUnit' - 'MaximumRolloverFiles' - 'ReserveDiskSpace' - ) - }) + $_ -in @( + 'Path' + 'MaximumFiles' + 'MaximumFileSize' + 'MaximumFileSizeUnit' + 'MaximumRolloverFiles' + 'ReserveDiskSpace' + ) + }) # If a property was found, throw an exception. if ($fileAuditProperty.Count -gt 0) diff --git a/source/Classes/020.SqlPermission.ps1 b/source/Classes/020.SqlPermission.ps1 index f03484a170..346d9e40da 100644 --- a/source/Classes/020.SqlPermission.ps1 +++ b/source/Classes/020.SqlPermission.ps1 @@ -354,8 +354,8 @@ class SqlPermission : SqlResourceBase $serverObject = $this.GetServerObject() $testSqlDscIsLoginParameters = @{ - ServerObject = $serverObject - Name = $this.Name + ServerObject = $serverObject + Name = $this.Name } # This will test wether the principal exist. diff --git a/source/DSCResources/DSC_SqlAGDatabase/DSC_SqlAGDatabase.psm1 b/source/DSCResources/DSC_SqlAGDatabase/DSC_SqlAGDatabase.psm1 index e39a9d5c47..3e5333bd37 100644 --- a/source/DSCResources/DSC_SqlAGDatabase/DSC_SqlAGDatabase.psm1 +++ b/source/DSCResources/DSC_SqlAGDatabase/DSC_SqlAGDatabase.psm1 @@ -159,7 +159,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification='Because the code throws based on an prior expression')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification = 'Because the code throws based on an prior expression')] [CmdletBinding()] param ( diff --git a/source/DSCResources/DSC_SqlAgentAlert/DSC_SqlAgentAlert.psm1 b/source/DSCResources/DSC_SqlAgentAlert/DSC_SqlAgentAlert.psm1 index 8467b46ce2..d43d4c0057 100644 --- a/source/DSCResources/DSC_SqlAgentAlert/DSC_SqlAgentAlert.psm1 +++ b/source/DSCResources/DSC_SqlAgentAlert/DSC_SqlAgentAlert.psm1 @@ -297,7 +297,7 @@ function Set-TargetResource function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -347,15 +347,18 @@ function Test-TargetResource if ($Ensure -eq 'Present') { - $returnValue = Test-DscParameterState ` - -CurrentValues $getTargetResourceResult ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @( + $testDscParameterStateParameters = @{ + CurrentValues = $getTargetResourceResult + DesiredValues = $PSBoundParameters + ValuesToCheck = @( 'Name' 'Severity' 'MessageId' - ) ` - -TurnOffTypeChecking + ) + TurnOffTypeChecking = $true + } + + $returnValue = Test-DscParameterState @testDscParameterStateParameters } else { diff --git a/source/DSCResources/DSC_SqlAgentFailsafe/DSC_SqlAgentFailsafe.psm1 b/source/DSCResources/DSC_SqlAgentFailsafe/DSC_SqlAgentFailsafe.psm1 index a2bd763d7f..b4a1b7e777 100644 --- a/source/DSCResources/DSC_SqlAgentFailsafe/DSC_SqlAgentFailsafe.psm1 +++ b/source/DSCResources/DSC_SqlAgentFailsafe/DSC_SqlAgentFailsafe.psm1 @@ -228,7 +228,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -275,14 +275,17 @@ function Test-TargetResource if ($Ensure -eq 'Present') { - $returnValue = Test-DscParameterState ` - -CurrentValues $getTargetResourceResult ` - -DesiredValues $PSBoundParameters ` - -ValuesToCheck @( + $testDscParameterStateParameters = @{ + CurrentValues = $getTargetResourceResult + DesiredValues = $PSBoundParameters + ValuesToCheck = @( 'FailsafeOperator' 'NotificationMethod' - ) ` - -TurnOffTypeChecking + ) + TurnOffTypeChecking = $true + } + + $returnValue = Test-DscParameterState @testDscParameterStateParameters } else { diff --git a/source/DSCResources/DSC_SqlAgentOperator/DSC_SqlAgentOperator.psm1 b/source/DSCResources/DSC_SqlAgentOperator/DSC_SqlAgentOperator.psm1 index 89923d6862..74504197b8 100644 --- a/source/DSCResources/DSC_SqlAgentOperator/DSC_SqlAgentOperator.psm1 +++ b/source/DSCResources/DSC_SqlAgentOperator/DSC_SqlAgentOperator.psm1 @@ -257,7 +257,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlAlias/DSC_SqlAlias.psm1 b/source/DSCResources/DSC_SqlAlias/DSC_SqlAlias.psm1 index 0faedaa8c9..9ae71138de 100644 --- a/source/DSCResources/DSC_SqlAlias/DSC_SqlAlias.psm1 +++ b/source/DSCResources/DSC_SqlAlias/DSC_SqlAlias.psm1 @@ -15,7 +15,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource since the resource modifies registry')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource since the resource modifies registry')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -133,7 +133,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource since the resource modifies registry')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource since the resource modifies registry')] [CmdletBinding()] param ( @@ -265,7 +265,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource since the resource modifies registry')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource since the resource modifies registry')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlAlwaysOnService/DSC_SqlAlwaysOnService.psm1 b/source/DSCResources/DSC_SqlAlwaysOnService/DSC_SqlAlwaysOnService.psm1 index b3e3e98d82..3c0f3b3eb0 100644 --- a/source/DSCResources/DSC_SqlAlwaysOnService/DSC_SqlAlwaysOnService.psm1 +++ b/source/DSCResources/DSC_SqlAlwaysOnService/DSC_SqlAlwaysOnService.psm1 @@ -128,7 +128,7 @@ function Set-TargetResource ) # Build the instance name to allow the Enable/Disable-Always On to connect to the instance - if ($InstanceName -eq "MSSQLSERVER") + if ($InstanceName -eq 'MSSQLSERVER') { $serverInstance = $ServerName } @@ -206,7 +206,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlConfiguration/DSC_SqlConfiguration.psm1 b/source/DSCResources/DSC_SqlConfiguration/DSC_SqlConfiguration.psm1 index 0efca05561..81863d6842 100644 --- a/source/DSCResources/DSC_SqlConfiguration/DSC_SqlConfiguration.psm1 +++ b/source/DSCResources/DSC_SqlConfiguration/DSC_SqlConfiguration.psm1 @@ -219,7 +219,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlDatabase/DSC_SqlDatabase.psm1 b/source/DSCResources/DSC_SqlDatabase/DSC_SqlDatabase.psm1 index aab411d68c..fc2072351d 100644 --- a/source/DSCResources/DSC_SqlDatabase/DSC_SqlDatabase.psm1 +++ b/source/DSCResources/DSC_SqlDatabase/DSC_SqlDatabase.psm1 @@ -400,7 +400,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlDatabaseDefaultLocation/DSC_SqlDatabaseDefaultLocation.psm1 b/source/DSCResources/DSC_SqlDatabaseDefaultLocation/DSC_SqlDatabaseDefaultLocation.psm1 index 732a7f0134..87e22d3fb4 100644 --- a/source/DSCResources/DSC_SqlDatabaseDefaultLocation/DSC_SqlDatabaseDefaultLocation.psm1 +++ b/source/DSCResources/DSC_SqlDatabaseDefaultLocation/DSC_SqlDatabaseDefaultLocation.psm1 @@ -119,7 +119,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification='Because the code throws based on an prior expression')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification = 'Because the code throws based on an prior expression')] [CmdletBinding()] param ( @@ -245,7 +245,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlDatabaseObjectPermission/DSC_SqlDatabaseObjectPermission.psm1 b/source/DSCResources/DSC_SqlDatabaseObjectPermission/DSC_SqlDatabaseObjectPermission.psm1 index 093bb62e52..79e4ea0087 100644 --- a/source/DSCResources/DSC_SqlDatabaseObjectPermission/DSC_SqlDatabaseObjectPermission.psm1 +++ b/source/DSCResources/DSC_SqlDatabaseObjectPermission/DSC_SqlDatabaseObjectPermission.psm1 @@ -49,7 +49,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-DatabaseObject is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-DatabaseObject is called')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -241,7 +241,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql will be implicitly called in the call to Compare-TargetResourceState')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql will be implicitly called in the call to Compare-TargetResourceState')] [CmdletBinding()] param ( @@ -523,7 +523,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql will be implicitly called in the call to Compare-TargetResourceState')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql will be implicitly called in the call to Compare-TargetResourceState')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlDatabaseRole/DSC_SqlDatabaseRole.psm1 b/source/DSCResources/DSC_SqlDatabaseRole/DSC_SqlDatabaseRole.psm1 index c71f4dc8c4..e53f1a01f2 100644 --- a/source/DSCResources/DSC_SqlDatabaseRole/DSC_SqlDatabaseRole.psm1 +++ b/source/DSCResources/DSC_SqlDatabaseRole/DSC_SqlDatabaseRole.psm1 @@ -92,7 +92,7 @@ function Get-TargetResource New-ObjectNotFoundException -Message $errorMessage } - $databaseIsUpdateable = $sqlDatabaseObject.IsUpdateable + $databaseIsUpdateable = $sqlDatabaseObject.IsUpdateable if ($sqlDatabaseRoleObject = $sqlDatabaseObject.Roles[$Name]) { @@ -414,7 +414,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlDatabaseUser/DSC_SqlDatabaseUser.psm1 b/source/DSCResources/DSC_SqlDatabaseUser/DSC_SqlDatabaseUser.psm1 index af52130914..6b78c52dd2 100644 --- a/source/DSCResources/DSC_SqlDatabaseUser/DSC_SqlDatabaseUser.psm1 +++ b/source/DSCResources/DSC_SqlDatabaseUser/DSC_SqlDatabaseUser.psm1 @@ -221,8 +221,8 @@ function Set-TargetResource # Default parameters for the cmdlet Invoke-SqlDscQuery used throughout. $invokeSqlDscQueryParameters = @{ - ServerName = $ServerName - InstanceName = $InstanceName + ServerName = $ServerName + InstanceName = $InstanceName DatabaseName = $DatabaseName } @@ -546,15 +546,19 @@ function Test-TargetResource $desiredValues['Ensure'] = $Ensure $desiredValues['UserType'] = $UserType - $testTargetResourceReturnValue = Test-DscParameterState -CurrentValues $getTargetResourceResult ` - -DesiredValues $desiredValues ` - -ValuesToCheck @( + $testDscParameterStateParameters = @{ + CurrentValues = $getTargetResourceResult + DesiredValues = $desiredValues + ValuesToCheck = @( 'LoginName' 'AsymmetricKeyName' 'CertificateName' 'UserType' - ) ` - -TurnOffTypeChecking + ) + TurnOffTypeChecking = $true + } + + $testTargetResourceReturnValue = Test-DscParameterState @testDscParameterStateParameters } else { diff --git a/source/DSCResources/DSC_SqlEndpoint/DSC_SqlEndpoint.psm1 b/source/DSCResources/DSC_SqlEndpoint/DSC_SqlEndpoint.psm1 index 5d30b3edc2..4bb50a2100 100644 --- a/source/DSCResources/DSC_SqlEndpoint/DSC_SqlEndpoint.psm1 +++ b/source/DSCResources/DSC_SqlEndpoint/DSC_SqlEndpoint.psm1 @@ -484,7 +484,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlEndpointPermission/DSC_SqlEndpointPermission.psm1 b/source/DSCResources/DSC_SqlEndpointPermission/DSC_SqlEndpointPermission.psm1 index e39508872f..2bd52577af 100644 --- a/source/DSCResources/DSC_SqlEndpointPermission/DSC_SqlEndpointPermission.psm1 +++ b/source/DSCResources/DSC_SqlEndpointPermission/DSC_SqlEndpointPermission.psm1 @@ -234,7 +234,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlMaxDop/DSC_SqlMaxDop.psm1 b/source/DSCResources/DSC_SqlMaxDop/DSC_SqlMaxDop.psm1 index 76390e9bbd..f667b0eab8 100644 --- a/source/DSCResources/DSC_SqlMaxDop/DSC_SqlMaxDop.psm1 +++ b/source/DSCResources/DSC_SqlMaxDop/DSC_SqlMaxDop.psm1 @@ -218,7 +218,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlMemory/DSC_SqlMemory.psm1 b/source/DSCResources/DSC_SqlMemory/DSC_SqlMemory.psm1 index 3727ca86f7..69e4b718fa 100644 --- a/source/DSCResources/DSC_SqlMemory/DSC_SqlMemory.psm1 +++ b/source/DSCResources/DSC_SqlMemory/DSC_SqlMemory.psm1 @@ -315,7 +315,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -331,7 +331,7 @@ function Test-TargetResource $ServerName = (Get-ComputerName), [Parameter()] - [ValidateSet("Present", "Absent")] + [ValidateSet('Present', 'Absent')] [System.String] $Ensure = 'Present', @@ -576,7 +576,7 @@ function Get-SqlDscPercentMemory try { $physicalMemory = (Get-CimInstance -ClassName Win32_ComputerSystem).TotalPhysicalMemory - $memoryInMegaBytes = [Math]::Round(($physicalMemory * ($PercentMemory/100)) / 1MB) + $memoryInMegaBytes = [Math]::Round(($physicalMemory * ($PercentMemory / 100)) / 1MB) } catch { diff --git a/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 b/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 index c7fdaf0649..7f16a1a6d8 100644 --- a/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 +++ b/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 @@ -186,7 +186,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] [CmdletBinding()] param ( @@ -415,7 +415,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlProtocolTcpIp/DSC_SqlProtocolTcpIp.psm1 b/source/DSCResources/DSC_SqlProtocolTcpIp/DSC_SqlProtocolTcpIp.psm1 index 7cb73650a3..2418198c40 100644 --- a/source/DSCResources/DSC_SqlProtocolTcpIp/DSC_SqlProtocolTcpIp.psm1 +++ b/source/DSCResources/DSC_SqlProtocolTcpIp/DSC_SqlProtocolTcpIp.psm1 @@ -229,7 +229,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] [CmdletBinding()] param ( @@ -493,7 +493,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called when calling Compare-TargetResourceState')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1 b/source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1 index 78a6bf2a7c..b29ae3afe7 100644 --- a/source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1 +++ b/source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1 @@ -25,7 +25,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this function since it uses CIM methods when calling Get-ReportingServicesData')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this function since it uses CIM methods when calling Get-ReportingServicesData')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -223,7 +223,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification='Because the code throws based on an prior expression')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification = 'Because the code throws based on an prior expression')] [CmdletBinding()] param ( @@ -319,6 +319,7 @@ function Set-TargetResource $reportingServicesDatabaseName = "ReportServer`$$InstanceName" } + # cSpell: ignore cimv2 $wmiOperatingSystem = Get-CimInstance -ClassName Win32_OperatingSystem -Namespace 'root/cimv2' -ErrorAction SilentlyContinue if ( $null -eq $wmiOperatingSystem ) { @@ -351,6 +352,7 @@ function Set-TargetResource { Write-Verbose -Message "Setting report server virtual directory on $DatabaseServerName\$DatabaseInstanceName to '$ReportServerVirtualDirectory'." + # cSpell: ignore Lcid $invokeRsCimMethodParameters = @{ CimInstance = $reportingServicesData.Configuration MethodName = 'SetVirtualDirectory' @@ -599,6 +601,8 @@ function Set-TargetResource existing URL reservations, change the appropriate virtual directory setting and re-add URL reservations, which will then contain the new virtual directory. + + cSpell: ignore netsh urlacl #> if ( -not [System.String]::IsNullOrEmpty($ReportServerVirtualDirectory) -and ($ReportServerVirtualDirectory -ne $currentConfig.ReportServerVirtualDirectory) ) @@ -853,7 +857,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this function since it uses CIM methods implicitly when calling Get-TargetResource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this function since it uses CIM methods implicitly when calling Get-TargetResource')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -1063,7 +1067,7 @@ function Get-ReportingServicesData #> function Invoke-RsCimMethod { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification='Because the code throws based on an prior expression')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification = 'Because the code throws based on an prior expression')] [CmdletBinding()] [OutputType([Microsoft.Management.Infrastructure.CimMethodResult])] param @@ -1093,10 +1097,13 @@ function Invoke-RsCimMethod } $invokeCimMethodResult = $CimInstance | Invoke-CimMethod @invokeCimMethodParameters + <# Successfully calling the method returns $invokeCimMethodResult.HRESULT -eq 0. If an general error occur in the Invoke-CimMethod, like calling a method that does not exist, returns $null in $invokeCimMethodResult. + + cSpell: ignore HRESULT #> if ($invokeCimMethodResult -and $invokeCimMethodResult.HRESULT -ne 0) { diff --git a/source/DSCResources/DSC_SqlRSSetup/DSC_SqlRSSetup.psm1 b/source/DSCResources/DSC_SqlRSSetup/DSC_SqlRSSetup.psm1 index 5a6b9517ec..e8fc2919dc 100644 --- a/source/DSCResources/DSC_SqlRSSetup/DSC_SqlRSSetup.psm1 +++ b/source/DSCResources/DSC_SqlRSSetup/DSC_SqlRSSetup.psm1 @@ -41,7 +41,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -216,9 +216,9 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars', '', Justification='Because $global:DSCMachineStatus is used to trigger a Restart, either by force or when there are pending changes.')] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '', Justification='Because $global:DSCMachineStatus is only set, never used (by design of Desired State Configuration).')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars', '', Justification = 'Because $global:DSCMachineStatus is used to trigger a Restart, either by force or when there are pending changes.')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '', Justification = 'Because $global:DSCMachineStatus is only set, never used (by design of Desired State Configuration).')] [CmdletBinding()] param ( @@ -393,6 +393,7 @@ function Set-TargetResource { if ($SuppressRestart -eq $true) { + # cSpell: ignore norestart $setupArguments += @{ 'norestart' = [System.Management.Automation.SwitchParameter] $true } @@ -599,7 +600,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 b/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 index 5c14720c47..cd394097fc 100644 --- a/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 +++ b/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 @@ -349,7 +349,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='It is imported in Get-TargetResource, also this resource explicitly loads assemblies from the GAC. This is being tracked in issue https://github.com/dsccommunity/SqlServerDsc/issues/1352')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'It is imported in Get-TargetResource, also this resource explicitly loads assemblies from the GAC. This is being tracked in issue https://github.com/dsccommunity/SqlServerDsc/issues/1352')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -823,7 +823,7 @@ function Register-DistributorPublisher cannot use this: Import-Module SqlServer - $connectionInfo = New-Object -TypeName 'Microsoft.SqlServer.Management.Common.ServerConnection' -ArgumentList @('testclu01a\SQL2014') + $connectionInfo = New-Object -TypeName 'Microsoft.SqlServer.Management.Common.ServerConnection' -ArgumentList @('TestClu01a\SQL2014') # Missing assembly 'Microsoft.SqlServer.Rmo' in module SqlServer prevents this call from working. $replication = New-Object -TypeName 'Microsoft.SqlServer.Replication.ReplicationServer' -ArgumentList @($connectionInfo) #> @@ -868,7 +868,7 @@ function Get-ConnectionInfoAssembly cannot use this: Import-Module SqlServer - $connectionInfo = New-Object -TypeName 'Microsoft.SqlServer.Management.Common.ServerConnection' -ArgumentList @('testclu01a\SQL2014') + $connectionInfo = New-Object -TypeName 'Microsoft.SqlServer.Management.Common.ServerConnection' -ArgumentList @('TestClu01a\SQL2014') # Missing assembly 'Microsoft.SqlServer.Rmo' in module SqlServer prevents this call from working. # Tracked in issue https://github.com/microsoft/sqlmanagementobjects/issues/59. $replication = New-Object -TypeName 'Microsoft.SqlServer.Replication.ReplicationServer' -ArgumentList @($connectionInfo) diff --git a/source/DSCResources/DSC_SqlRole/DSC_SqlRole.psm1 b/source/DSCResources/DSC_SqlRole/DSC_SqlRole.psm1 index 755517af13..36ae7b302f 100644 --- a/source/DSCResources/DSC_SqlRole/DSC_SqlRole.psm1 +++ b/source/DSCResources/DSC_SqlRole/DSC_SqlRole.psm1 @@ -79,13 +79,13 @@ function Get-TargetResource } return @{ - ServerRoleName = $ServerRoleName - Ensure = $ensure - ServerName = $ServerName - InstanceName = $InstanceName - Members = $membersInRole - MembersToInclude = $null - MembersToExclude = $null + ServerRoleName = $ServerRoleName + Ensure = $ensure + ServerName = $ServerName + InstanceName = $InstanceName + Members = $membersInRole + MembersToInclude = $null + MembersToExclude = $null } } @@ -155,7 +155,7 @@ function Set-TargetResource ) $assertBoundParameterParameters = @{ - BoundParameterList = $PSBoundParameters + BoundParameterList = $PSBoundParameters MutuallyExclusiveList1 = @( 'Members' ) @@ -327,7 +327,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -371,7 +371,7 @@ function Test-TargetResource ) $assertBoundParameterParameters = @{ - BoundParameterList = $PSBoundParameters + BoundParameterList = $PSBoundParameters MutuallyExclusiveList1 = @( 'Members' ) @@ -392,9 +392,9 @@ function Test-TargetResource $correctedParameters = Get-CorrectedMemberParameters @originalParameters $getTargetResourceParameters = @{ - InstanceName = $InstanceName - ServerName = $ServerName - ServerRoleName = $ServerRoleName + InstanceName = $InstanceName + ServerName = $ServerName + ServerRoleName = $ServerRoleName } $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters @@ -636,7 +636,7 @@ function Test-SqlSecurityPrincipal .SYNOPSIS This function sanitizes the parameters If Members is filled, MembersToInclude and MembersToExclude should be empty. - If ServerRoleName is sysadmin, make sure we dont try to delete SA from it. + If ServerRoleName is sysadmin, make sure we don't try to delete SA from it. .PARAMETER Members The members the server role should have. diff --git a/source/DSCResources/DSC_SqlScript/DSC_SqlScript.psm1 b/source/DSCResources/DSC_SqlScript/DSC_SqlScript.psm1 index 9e72f9f15f..c224541152 100644 --- a/source/DSCResources/DSC_SqlScript/DSC_SqlScript.psm1 +++ b/source/DSCResources/DSC_SqlScript/DSC_SqlScript.psm1 @@ -66,7 +66,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -224,7 +224,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] [CmdletBinding()] param ( @@ -362,7 +362,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlScriptQuery/DSC_SqlScriptQuery.psm1 b/source/DSCResources/DSC_SqlScriptQuery/DSC_SqlScriptQuery.psm1 index d2d4c3c6d5..de324a4060 100644 --- a/source/DSCResources/DSC_SqlScriptQuery/DSC_SqlScriptQuery.psm1 +++ b/source/DSCResources/DSC_SqlScriptQuery/DSC_SqlScriptQuery.psm1 @@ -66,7 +66,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -224,7 +224,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] [CmdletBinding()] param ( @@ -362,7 +362,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called in Invoke-SqlScript')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlSecureConnection/DSC_SqlSecureConnection.psm1 b/source/DSCResources/DSC_SqlSecureConnection/DSC_SqlSecureConnection.psm1 index 62c1de3ee0..518597e587 100644 --- a/source/DSCResources/DSC_SqlSecureConnection/DSC_SqlSecureConnection.psm1 +++ b/source/DSCResources/DSC_SqlSecureConnection/DSC_SqlSecureConnection.psm1 @@ -39,7 +39,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -213,7 +213,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] param ( @@ -346,7 +346,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -476,7 +476,7 @@ function Get-EncryptedConnectionSetting #> function Set-EncryptedConnectionSetting { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification='Because the code throws based on an prior expression')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification = 'Because the code throws based on an prior expression')] [CmdletBinding()] param ( diff --git a/source/DSCResources/DSC_SqlServiceAccount/DSC_SqlServiceAccount.psm1 b/source/DSCResources/DSC_SqlServiceAccount/DSC_SqlServiceAccount.psm1 index c158540cac..2a43c04f43 100644 --- a/source/DSCResources/DSC_SqlServiceAccount/DSC_SqlServiceAccount.psm1 +++ b/source/DSCResources/DSC_SqlServiceAccount/DSC_SqlServiceAccount.psm1 @@ -35,7 +35,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is called when Get-ServiceObject is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is called when Get-ServiceObject is called')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -127,7 +127,7 @@ function Get-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is implicitly called when calling Get-TargetResource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is implicitly called when calling Get-TargetResource')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -209,7 +209,7 @@ function Test-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is called when Get-ServiceObject is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is called when Get-ServiceObject is called')] [CmdletBinding()] param ( diff --git a/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 b/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 index 24056b34f2..2ba2efbbca 100644 --- a/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 +++ b/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 @@ -308,7 +308,7 @@ function Get-TargetResource if ($SqlVersion -ge 13) { - # Retrieve information about Tempdb database and its files. + # Retrieve information about TempDb database and its files. $currentTempDbProperties = Get-TempDbProperties -ServerName $sqlHostName -InstanceName $InstanceName $getTargetResourceReturnValue.SQLTempDBDir = $currentTempDbProperties.SQLTempDBDir @@ -325,7 +325,7 @@ function Get-TargetResource $getRegistryPropertyParams = @{ Path = "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL$($SqlVersion).$($InstanceName)\Setup" Name = 'IsProductCoveredBySA' - } + } $getTargetResourceReturnValue.ProductCoveredBySA = Get-RegistryPropertyValue @getRegistryPropertyParams } @@ -456,6 +456,7 @@ function Get-TargetResource $installedSharedFeatures = Get-InstalledSharedFeatures -SqlServerMajorVersion $SqlVersion $features += '{0},' -f ($installedSharedFeatures -join ',') + # cSpell: ignore SSMS ADV_SSMS if ((Test-IsSsmsInstalled -SqlServerMajorVersion $SqlVersion)) { $features += 'SSMS,' @@ -890,6 +891,7 @@ function Set-TargetResource [System.String] $ASConfigDir, + # cSpell: ignore POWERPIVOT [Parameter()] [ValidateSet('MULTIDIMENSIONAL', 'TABULAR', 'POWERPIVOT', IgnoreCase = $false)] [System.String] @@ -1387,6 +1389,7 @@ function Set-TargetResource if ($PSBoundParameters.ContainsKey('NpEnabled')) { + # cSpell: ignore NPENABLED if ($NpEnabled) { $setupArguments['NPENABLED'] = 1 @@ -1399,6 +1402,7 @@ function Set-TargetResource if ($PSBoundParameters.ContainsKey('TcpEnabled')) { + # cSpell: ignore TCPENABLED if ($TcpEnabled) { $setupArguments['TCPENABLED'] = 1 @@ -1424,7 +1428,7 @@ function Set-TargetResource # tempdb : define SqlTempdbFileCount if ($PSBoundParameters.ContainsKey('SqlTempdbFileCount')) { - $setupArguments['SqlTempdbFileCount'] = $SqlTempdbFileCount + $setupArguments['SqlTempdbFileCount'] = $sqlTempDbFileCount } # tempdb : define SqlTempdbFileSize @@ -1487,6 +1491,7 @@ function Set-TargetResource if ($PSBoundParameters.ContainsKey('RSInstallMode')) { + # cSpell: ignore RSINSTALLMODE $setupArguments['RSINSTALLMODE'] = $RSInstallMode } } @@ -1799,7 +1804,7 @@ function Set-TargetResource False, or omitting the parameter, indicates it's covered under a SQL Server license. Default value is False. - Not used in Test-TargetResource. + Not used in Test-TargetResource. .PARAMETER UpdateEnabled Enabled updates during installation. @@ -2518,7 +2523,7 @@ function Get-ServiceAccountParameters $accountParameters = Get-ServiceAccount -ServiceAccount $ServiceAccount $parameters = @{} - # Assign the service type the account + # Assign the service type the account. cSpell: ignore SVCACCOUNT $parameters = @{ "$($ServiceType)SVCACCOUNT" = $accountParameters.UserName } @@ -2526,7 +2531,7 @@ function Get-ServiceAccountParameters # Check to see if password is null if (![string]::IsNullOrEmpty($accountParameters.Password)) { - # Add the password to the hashtable + # Add the password to the hashtable. cSpell: ignore SVCPASSWORD $parameters.Add("$($ServiceType)SVCPASSWORD", $accountParameters.Password) } @@ -2916,22 +2921,22 @@ function Get-TempDbProperties $databaseTempDb = $sqlServerObject.Databases['tempdb'] - # Tempdb data primary path. + # TempDb data primary path. $sqlTempDBPrimaryFilePath = $databaseTempDb.PrimaryFilePath $primaryFileGroup = $databaseTempDb.FileGroups['PRIMARY'] - # Tempdb data files count. - $sqlTempdbFileCount = $primaryFileGroup.Files.Count + # TempDb data files count. + $sqlTempDbFileCount = $primaryFileGroup.Files.Count - # Tempdb data files size. - $sqlTempdbFileSize = ( + # TempDb data files size. + $sqlTempDbFileSize = ( $primaryFileGroup.Files.Size | Measure-Object -Average ).Average / 1KB - # Tempdb data files average growth in KB. - $sqlTempdbAverageFileGrowthKB = ( + # TempDb data files average growth in KB. + $sqlTempDbAverageFileGrowthKB = ( $primaryFileGroup.Files | Where-Object -FilterScript { $_.GrowthType -eq 'KB' @@ -2940,8 +2945,8 @@ function Get-TempDbProperties Measure-Object -Average ).Average - # Tempdb data files average growth in Percent. - $sqlTempdbFileGrowthPercent = ( + # TempDb data files average growth in Percent. + $sqlTempDbFileGrowthPercent = ( $primaryFileGroup.Files | Where-Object -FilterScript { $_.GrowthType -eq 'Percent' @@ -2950,23 +2955,23 @@ function Get-TempDbProperties Measure-Object -Average ).Average - $sqlTempdbFileGrowthMB = 0 + $sqlTempDbFileGrowthMB = 0 # Convert the KB value into MB. - if ($sqlTempdbAverageFileGrowthKB) + if ($sqlTempDbAverageFileGrowthKB) { - $sqlTempdbFileGrowthMB = $sqlTempdbAverageFileGrowthKB / 1KB + $sqlTempDbFileGrowthMB = $sqlTempDbAverageFileGrowthKB / 1KB } - $sqlTempdbFileGrowth = $sqlTempdbFileGrowthMB + $sqlTempdbFileGrowthPercent + $sqlTempDbFileGrowth = $sqlTempDbFileGrowthMB + $sqlTempDbFileGrowthPercent $tempdbLogFiles = $databaseTempDb.LogFiles - # Tempdb log file size. - $sqlTempdbLogFileSize = ($tempdbLogFiles.Size | Measure-Object -Average).Average / 1KB + # TempDb log file size. + $sqlTempDbLogFileSize = ($tempdbLogFiles.Size | Measure-Object -Average).Average / 1KB - # Tempdb log file average growth in KB. - $sqlTempdbAverageLogFileGrowthKB = ( + # TempDb log file average growth in KB. + $sqlTempDbAverageLogFileGrowthKB = ( $tempdbLogFiles | Where-Object -FilterScript { $_.GrowthType -eq 'KB' @@ -2975,8 +2980,8 @@ function Get-TempDbProperties Measure-Object -Average ).Average - # Tempdb log file average growth in Percent. - $sqlTempdbLogFileGrowthPercent = ( + # TempDb log file average growth in Percent. + $sqlTempDbLogFileGrowthPercent = ( $tempdbLogFiles | Where-Object -FilterScript { $_.GrowthType -eq 'Percent' @@ -2986,25 +2991,25 @@ function Get-TempDbProperties ).Average # Convert the KB value into MB. - if ($sqlTempdbAverageLogFileGrowthKB) + if ($sqlTempDbAverageLogFileGrowthKB) { - $sqlTempdbLogFileGrowthMB = $sqlTempdbAverageLogFileGrowthKB / 1KB + $sqlTempDbLogFileGrowthMB = $sqlTempDbAverageLogFileGrowthKB / 1KB } else { - $sqlTempdbLogFileGrowthMB = 0 + $sqlTempDbLogFileGrowthMB = 0 } # The sum of the average growth in KB and average growth in Percent. - $sqlTempdbLogFileGrowth = $sqlTempdbLogFileGrowthMB + $sqlTempdbLogFileGrowthPercent + $sqlTempDbLogFileGrowth = $sqlTempDbLogFileGrowthMB + $sqlTempDbLogFileGrowthPercent return @{ SQLTempDBDir = $sqlTempDBPrimaryFilePath - SqlTempdbFileCount = $sqlTempdbFileCount - SqlTempdbFileSize = $sqlTempdbFileSize - SqlTempdbFileGrowth = $sqlTempdbFileGrowth - SqlTempdbLogFileSize = $sqlTempdbLogFileSize - SqlTempdbLogFileGrowth = $sqlTempdbLogFileGrowth + SqlTempdbFileCount = $sqlTempDbFileCount + SqlTempdbFileSize = $sqlTempDbFileSize + SqlTempdbFileGrowth = $sqlTempDbFileGrowth + SqlTempdbLogFileSize = $sqlTempDbLogFileSize + SqlTempdbLogFileGrowth = $sqlTempDbLogFileGrowth } } @@ -3042,6 +3047,7 @@ function Get-ServiceNamesForInstance if ($InstanceName -eq 'MSSQLSERVER') { + # cSpell: ignore SQLSERVERAGENT MSSQLFDLauncher $serviceNames.DatabaseService = 'MSSQLSERVER' $serviceNames.AgentService = 'SQLSERVERAGENT' $serviceNames.FullTextService = 'MSSQLFDLauncher' diff --git a/source/DSCResources/DSC_SqlTraceFlag/DSC_SqlTraceFlag.psm1 b/source/DSCResources/DSC_SqlTraceFlag/DSC_SqlTraceFlag.psm1 index de790fd124..3779e64d47 100644 --- a/source/DSCResources/DSC_SqlTraceFlag/DSC_SqlTraceFlag.psm1 +++ b/source/DSCResources/DSC_SqlTraceFlag/DSC_SqlTraceFlag.psm1 @@ -78,11 +78,11 @@ function Get-TargetResource $_.TrimStart('-T') } ) - } - else - { - Write-Debug -Message ($script:localizedData.DebugNoTraceFlags -f $MyInvocation.MyCommand) - } + } + else + { + Write-Debug -Message ($script:localizedData.DebugNoTraceFlags -f $MyInvocation.MyCommand) + } } else { @@ -363,7 +363,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Import-SqlDscPreferredModule is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Import-SqlDscPreferredModule is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlWaitForAG/DSC_SqlWaitForAG.psm1 b/source/DSCResources/DSC_SqlWaitForAG/DSC_SqlWaitForAG.psm1 index 0b654ce8aa..9ebdfc924b 100644 --- a/source/DSCResources/DSC_SqlWaitForAG/DSC_SqlWaitForAG.psm1 +++ b/source/DSCResources/DSC_SqlWaitForAG/DSC_SqlWaitForAG.psm1 @@ -148,7 +148,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] param ( @@ -193,9 +193,10 @@ function Set-TargetResource if ($clusterGroupFound) { Write-Verbose -Message ( - '{0} {1}' -f ` + '{0} {1}' -f @( ($script:localizedData.FoundClusterGroup -f $Name, $RetryCount, ($RetryIntervalSec * $RetryCount)), ($script:localizedData.SleepMessage -f $RetryIntervalSec) + ) ) Start-Sleep -Seconds $RetryIntervalSec @@ -203,9 +204,10 @@ function Set-TargetResource } Write-Verbose -Message ( - '{0} {1}' -f ` + '{0} {1}' -f @( ($script:localizedData.MissingClusterGroup -f $Name, $RetryCount, ($RetryIntervalSec * $RetryCount)), ($script:localizedData.RetryMessage -f $RetryIntervalSec) + ) ) Start-Sleep -Seconds $RetryIntervalSec @@ -245,7 +247,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='The command Connect-Sql is called when Get-TargetResource is called')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'The command Connect-Sql is called when Get-TargetResource is called')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/DSCResources/DSC_SqlWindowsFirewall/DSC_SqlWindowsFirewall.psm1 b/source/DSCResources/DSC_SqlWindowsFirewall/DSC_SqlWindowsFirewall.psm1 index 23c44e0a49..d67b8dd352 100644 --- a/source/DSCResources/DSC_SqlWindowsFirewall/DSC_SqlWindowsFirewall.psm1 +++ b/source/DSCResources/DSC_SqlWindowsFirewall/DSC_SqlWindowsFirewall.psm1 @@ -26,7 +26,7 @@ $script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US' #> function Get-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param @@ -348,7 +348,7 @@ function Get-TargetResource #> function Set-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] param ( @@ -616,7 +616,7 @@ function Set-TargetResource #> function Test-TargetResource { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification='Neither command is needed for this resource')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('SqlServerDsc.AnalyzerRules\Measure-CommandsNeededToLoadSMO', '', Justification = 'Neither command is needed for this resource')] [CmdletBinding()] [OutputType([System.Boolean])] param diff --git a/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psd1 b/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psd1 index 059014ed05..1674c4a3f6 100644 --- a/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psd1 +++ b/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psd1 @@ -1,23 +1,23 @@ @{ - RootModule = 'SqlServerDsc.Common.psm1' + RootModule = 'SqlServerDsc.Common.psm1' # Version number of this module. - ModuleVersion = '1.0.0' + ModuleVersion = '1.0.0' # ID used to uniquely identify this module - GUID = 'b8e5084a-07a8-4135-8a26-00614e56ba71' + GUID = 'b8e5084a-07a8-4135-8a26-00614e56ba71' # Author of this module - Author = 'DSC Community' + Author = 'DSC Community' # Company or vendor of this module - CompanyName = 'DSC Community' + CompanyName = 'DSC Community' # Copyright statement for this module - Copyright = 'Copyright the DSC Community contributors. All rights reserved.' + Copyright = 'Copyright the DSC Community contributors. All rights reserved.' # Description of the functionality provided by this module - Description = 'Functions used by the DSC resources in SqlServerDsc.' + Description = 'Functions used by the DSC resources in SqlServerDsc.' # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @( @@ -55,16 +55,16 @@ ) # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. - CmdletsToExport = @() + CmdletsToExport = @() # Variables to export from this module VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. - AliasesToExport = @() + AliasesToExport = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. - PrivateData = @{ + PrivateData = @{ PSData = @{ } # End of PSData hashtable diff --git a/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 b/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 index 52d3779ddb..79552aa161 100644 --- a/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 +++ b/source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1 @@ -83,7 +83,7 @@ function Copy-ItemWithRobocopy $quotedPath = '"{0}"' -f $Path $quotedDestinationPath = '"{0}"' -f $DestinationPath - $robocopyExecutable = Get-Command -Name "Robocopy.exe" -ErrorAction Stop + $robocopyExecutable = Get-Command -Name 'Robocopy.exe' -ErrorAction Stop $robocopyArgumentSilent = '/njh /njs /ndl /nc /ns /nfl' $robocopyArgumentCopySubDirectoriesIncludingEmpty = '/e' @@ -1673,7 +1673,7 @@ function Split-FullSqlInstanceName #> function Test-ClusterPermissions { - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification='Because the code throws based on an prior expression')] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('AvoidThrowOutsideOfTry', '', Justification = 'Because the code throws based on an prior expression')] [CmdletBinding()] [OutputType([System.Boolean])] param @@ -1963,14 +1963,14 @@ function Get-ServiceAccount '^(?:NT ?AUTHORITY\\)?(SYSTEM|LOCALSERVICE|LOCAL SERVICE|NETWORKSERVICE|NETWORK SERVICE)$' { $accountParameters = @{ - "UserName" = "NT AUTHORITY\$($Matches[1])" + UserName = "NT AUTHORITY\$($Matches[1])" } } '^(?:NT SERVICE\\)(.*)$' { $accountParameters = @{ - "UserName" = "NT SERVICE\$($Matches[1])" + UserName = "NT SERVICE\$($Matches[1])" } } @@ -1978,7 +1978,7 @@ function Get-ServiceAccount '\$$' { $accountParameters = @{ - "UserName" = $ServiceAccount.UserName + UserName = $ServiceAccount.UserName } } @@ -1986,8 +1986,8 @@ function Get-ServiceAccount default { $accountParameters = @{ - "UserName" = $ServiceAccount.UserName - "Password" = $ServiceAccount.GetNetworkCredential().Password + UserName = $ServiceAccount.UserName + Password = $ServiceAccount.GetNetworkCredential().Password } } } diff --git a/source/Modules/SqlServerDsc.Common/en-US/SqlServerDsc.Common.strings.psd1 b/source/Modules/SqlServerDsc.Common/en-US/SqlServerDsc.Common.strings.psd1 index dedd2f53b0..bc351cb592 100644 --- a/source/Modules/SqlServerDsc.Common/en-US/SqlServerDsc.Common.strings.psd1 +++ b/source/Modules/SqlServerDsc.Common/en-US/SqlServerDsc.Common.strings.psd1 @@ -1,5 +1,6 @@ # Localized resources for helper module SqlServerDsc.Common. +# cSpell: ignore SQLCOMMON ConvertFrom-StringData @' RobocopyIsCopying = Robocopy is copying media from source '{0}' to destination '{1}'. (SQLCOMMON0008) RobocopyUsingUnbufferedIo = Robocopy is using unbuffered I/O. (SQLCOMMON0009) diff --git a/source/Modules/SqlServerDsc.Common/sv-SE/SqlServerDsc.Common.strings.psd1 b/source/Modules/SqlServerDsc.Common/sv-SE/SqlServerDsc.Common.strings.psd1 index 7af1c834ea..5aaf6b8902 100644 --- a/source/Modules/SqlServerDsc.Common/sv-SE/SqlServerDsc.Common.strings.psd1 +++ b/source/Modules/SqlServerDsc.Common/sv-SE/SqlServerDsc.Common.strings.psd1 @@ -6,6 +6,7 @@ or improve these strings. #> +# cSpell: ignore Obuffrad SQLCOMMON ConvertFrom-StringData @' RobocopyIsCopying = Robocopy kopierar media från källan '{0}' till destinationen '{1}'. (SQLCOMMON0008) RobocopyUsingUnbufferedIo = Robocopy använder sig av obuffrad I/O. (SQLCOMMON0009) diff --git a/source/Private/Invoke-ReportServerSetupAction.ps1 b/source/Private/Invoke-ReportServerSetupAction.ps1 index 678fe1c359..c43a2bce2c 100644 --- a/source/Private/Invoke-ReportServerSetupAction.ps1 +++ b/source/Private/Invoke-ReportServerSetupAction.ps1 @@ -245,8 +245,8 @@ function Invoke-ReportServerSetupAction if ($Edition) { $editionMap = @{ - Developer = 'Dev' - Evaluation = 'Eval' + Developer = 'Dev' + Evaluation = 'Eval' ExpressAdvanced = 'ExprAdv' } diff --git a/source/Public/Get-SqlDscConfigurationOption.ps1 b/source/Public/Get-SqlDscConfigurationOption.ps1 index 7931229243..61558ecf58 100644 --- a/source/Public/Get-SqlDscConfigurationOption.ps1 +++ b/source/Public/Get-SqlDscConfigurationOption.ps1 @@ -73,9 +73,9 @@ function Get-SqlDscConfigurationOption $missingConfigurationOptionMessage = $script:localizedData.ConfigurationOption_Get_Missing -f $Name $writeErrorParameters = @{ - Message = $missingConfigurationOptionMessage - Category = 'InvalidOperation' - ErrorId = 'GSDCO0001' # cspell: disable-line + Message = $missingConfigurationOptionMessage + Category = 'InvalidOperation' + ErrorId = 'GSDCO0001' # cspell: disable-line TargetObject = $Name } diff --git a/source/Public/Get-SqlDscPreferredModule.ps1 b/source/Public/Get-SqlDscPreferredModule.ps1 index 8715152986..685a089037 100644 --- a/source/Public/Get-SqlDscPreferredModule.ps1 +++ b/source/Public/Get-SqlDscPreferredModule.ps1 @@ -95,7 +95,7 @@ function Get-SqlDscPreferredModule $availableModules = Get-Module -Name $Name -ListAvailable | ForEach-Object -Process { @{ - PSModuleInfo = $_ + PSModuleInfo = $_ CalculatedVersion = $_ | Get-SMOModuleCalculatedVersion } }