diff --git a/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 b/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 index 9234b016b..2ecb1f7a9 100644 --- a/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 +++ b/DSCResources/MSFT_xSQLServerSetup/MSFT_xSQLServerSetup.psm1 @@ -953,7 +953,7 @@ function Set-TargetResource # Get the disk resources that are available (not assigned to a cluster role) $availableStorage = Get-CimInstance -Namespace 'root/MSCluster' -ClassName 'MSCluster_ResourceGroup' -Filter "Name = 'Available Storage'" | Get-CimAssociatedInstance -Association MSCluster_ResourceGroupToResource -ResultClassName MSCluster_Resource | ` - Add-Member -MemberType NoteProperty -Name 'IsPossibleOwner' -Value $false -PassThru + Add-Member -MemberType NoteProperty -Name 'IsPossibleOwner' -Value $false -PassThru # First map regular cluster volumes foreach ($diskResource in $availableStorage) @@ -1651,11 +1651,10 @@ function Test-TargetResource $getTargetResourceResult = Get-TargetResource @getTargetResourceParameters New-VerboseMessage -Message "Features found: '$($getTargetResourceResult.Features)'" - $result = $false + $result = $true + if ($getTargetResourceResult.Features ) { - $result = $true - foreach ($feature in $Features.Split(",")) { # Given that all the returned features are uppercase, make sure that the feature to search for is also uppercase @@ -1668,13 +1667,15 @@ function Test-TargetResource } } } + else + { + $result = $false + } if ($PSCmdlet.ParameterSetName -eq 'ClusterInstall') { New-VerboseMessage -Message "Clustered install, checking parameters." - $result = $true - $boundParameters.Keys | Where-Object {$_ -imatch "^FailoverCluster"} | ForEach-Object { $variableName = $_ @@ -1685,7 +1686,7 @@ function Test-TargetResource } } - $result + return $result } <# diff --git a/README.md b/README.md index c49305a12..e01d117e6 100644 --- a/README.md +++ b/README.md @@ -887,6 +887,9 @@ Installs SQL Server on the target node. * ASSysAdminAccounts * AsSvcAccount +> **Note:** It is not possible to add or remove features to a SQL Server failover cluster. This is a limitation of SQL Server. +> See article [You cannot add or remove features to a SQL Server 2008, SQL Server 2008 R2, or SQL Server 2012 failover cluster](https://support.microsoft.com/en-us/help/2547273/you-cannot-add-or-remove-features-to-a-sql-server-2008,-sql-server-2008-r2,-or-sql-server-2012-failover-cluster). + #### Parameters * **[String] Action** _(Write)_: The action to be performed. Defaults to 'Install'. *Note: AddNode is not currently functional.* { _Install_ | InstallFailoverCluster | AddNode | PrepareFailoverCluster | CompleteFailoverCluster }