Set-Setting

Prev Next

Summary

Updates an existing setting.

Set-Setting
    -Entry

Returns a setting object.

Parameters

Parameter

Type

Required?

Notes

Entry

Setting Object

Yes


Examples

Update an existing setting

# Get the setting
$setting =  Get-Setting -Id "Check for Billing Entries Warning"

# Enable the setting
$setting.ValueAsBoolean = $true

# Update the setting
$setting = Set-Setting -Entry $setting

Write-Output "Updated setting '$($setting.Key)' (Main Category: #$($setting.MainCategory), Value: $($setting.ValueAsBoolean))"

# For debug purposes, convert the entity to output as JSON so we can see the available fields
$jsonOutput = $setting | ConvertTo-Json -Depth 10

Write-Output ""
Write-Output "JSON Results:"

# Output the JSON results
Write-Output $jsonOutput

Execution results:

Updated setting 'Check for Billing Entries Warning' (Main Category: #Tasks, Value: True)

JSON Results:
{
  "Key": "Check for Billing Entries Warning",
  "Description": "Enables or disables a message that warns users if they try to close a Task that does not have any associated Billing Entries.",
  "MainCategory": "Tasks",
  "SubCategory": null,
  "DataTypeId": 5,
  "DataTypeName": "Yes or No Choice",
  "ValueAsString": null,
  "ValueAsBoolean": true,
  "ValueAsNumber": null,
  "ValueAsDecimal": null,
  "ValueAsDate": null,
  "SortOrder": 0,
  "Locked": false,
  "Hidden": false,
  "LastUpdatedByFullName": "Max Miller",
  "LastUpdatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
  "LastUpdatedOn": "2026-01-20T16:20:40.5200767+00:00",
  "LastUpdatedBy": null
}