--- title: "Set-Setting" slug: "scripting-set-setting" updated: 2026-01-20T16:24:18Z published: 2026-01-20T16:24:18Z canonical: "help.agilityblue.com/scripting-set-setting" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.agilityblue.com/llms.txt > Use this file to discover all available pages before exploring further. # Set-Setting ## Summary Updates an existing setting. ```powershell Set-Setting    -Entry ``` Returns a [setting](https://apidocs.agilityblue.com/#bddc6946-2dff-47c8-955f-d35b7aec0ce7) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | [Setting](https://apidocs.agilityblue.com/#bddc6946-2dff-47c8-955f-d35b7aec0ce7) Object | Yes | | ## Examples ### Update an existing setting ```powershell # 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: ```json 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 } ```