PowerStig icon indicating copy to clipboard operation
PowerStig copied to clipboard

never converge after apply SQL 2016 v1.3

Open pursca opened this issue 6 years ago • 1 comments

Describe the bug after apply SQL 2016 v1.3 STIG the state never return true after 24 hours

To Reproduce

  1. on a member server with sql 2016 installed, default instance
  2. apply the following configuration

configuration SqlS2016STIG { param ( [parameter()] [string] $NodeName = 'localhost' ) Import-DscResource -ModuleName PowerStig Node $NodeName { SqlServer BaseLine { SqlVersion = '2016' SqlRole = 'Instance' StigVersion = '1.3' ServerInstance = 'SQL2016STIG' } } } SqlS2016STIG -NodeName localhost -OutputPath C:\STIG\SQLConfig Start-dscconfiguration -path c:\stig\Sqlconfig

  1. constantly check Test-DscConfiguration ... always show as false with pending state
  2. run get-DscConfiguration got following error:

Get-DscConfiguration : PowerShell DSC resource MSFT_SqlScriptQuery failed to execute Get-TargetResource functionality with error message: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Incorrect syntax near ')'. At line:1 char:1

  • Get-DscConfiguration
  •   + CategoryInfo          : InvalidOperation: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager)
     [Get-DscConfiguration], CimException
      + FullyQualifiedErrorId : ProviderOperationExecutionFailure,Get-DscConfiguration
    
    
    

Expected behavior

pursca avatar Aug 04 '19 01:08 pursca

The audit location is built into the set query as C:\Audits I had to create this directory manually to get the configuration to apply and converge.

Applesnacks avatar Dec 08 '20 18:12 Applesnacks