templates/AWSQuickstart-MSSQL.yml [1005:1030]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Parameters:
      commands: 
        - |     
           function DscStatusCheck () {
               $LCMState = (Get-DscLocalConfigurationManager).LCMState
               if ($LCMState -eq 'PendingConfiguration' -Or $LCMState -eq 'PendingReboot') {
                   'returning 3010, should continue after reboot'
                   exit 3010
               } else {
                 'Completed'
               }
           }
           
           Start-DscConfiguration 'C:\AWSQuickstart\AddAG' -Wait -Verbose -Force

           DscStatusCheck
- name: "3NodeAdditionalCreateAG"
  action: "aws:runCommand"
  onFailure: "step:signalfailure"
  inputs:
    DocumentName: "AWS-RunRemoteScript"
    InstanceIds:
      - "{{wsfcNode2InstanceId.InstanceId}}"
      - "{{wsfcNode3InstanceId.InstanceId}}"
    CloudWatchOutputConfig:
      CloudWatchOutputEnabled: "true"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/sql.template.yaml [2202:2227]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            Parameters:
              commands: 
                - |     
                   function DscStatusCheck () {
                       $LCMState = (Get-DscLocalConfigurationManager).LCMState
                       if ($LCMState -eq 'PendingConfiguration' -Or $LCMState -eq 'PendingReboot') {
                           'returning 3010, should continue after reboot'
                           exit 3010
                       } else {
                         'Completed'
                       }
                   }
                   
                   Start-DscConfiguration 'C:\AWSQuickstart\AddAG' -Wait -Verbose -Force
        
                   DscStatusCheck
        - name: "3NodeAdditionalCreateAG"
          action: "aws:runCommand"
          onFailure: "step:signalfailure"
          inputs:
            DocumentName: "AWS-RunRemoteScript"
            InstanceIds:
              - "{{wsfcNode2InstanceId.InstanceId}}"
              - "{{wsfcNode3InstanceId.InstanceId}}"
            CloudWatchOutputConfig:
              CloudWatchOutputEnabled: "true"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



