Sha256: 006c839642d480cfbbdbc4436a9a54b1f55801b75785144a8c833f1685894486

Contents?: true

Size: 687 Bytes

Versions: 13

Compression:

Stored size: 687 Bytes

Contents

Try {
  $Result = Invoke-DscResource @InvokeParams
} catch {
  $Response.errormessage   = $_.Exception.Message
  return ($Response | ConvertTo-Json -Compress)
}

# keep the switch for when Test passes back changed properties
Switch ($invokeParams.Method) {
  'Test' {
    $Response.indesiredstate = $Result.InDesiredState
    return ($Response | ConvertTo-Json -Compress)
  }
  'Set' {
    $Response.indesiredstate = $true
    $Response.rebootrequired = $Result.RebootRequired
    return ($Response | ConvertTo-Json -Compress)
  }
  'Get' {
    $CanonicalizedResult = ConvertTo-CanonicalResult -Result $Result
    return ($CanonicalizedResult | ConvertTo-Json -Compress -Depth 10)
  }
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ruby-pwsh-0.9.0 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.8.0 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.7.4 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.7.3 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.7.2 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.7.1 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.7.0 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.6.3 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.6.2 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.6.1 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.6.0 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.5.1 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1
ruby-pwsh-0.5.0 lib/puppet/provider/dsc_base_provider/invoke_dsc_resource_postscript.ps1