Summary
Retrieves an existing setting.
Get-Setting
-IdReturns a setting object.
Parameters
Parameter | Type | Required? | Notes |
|---|---|---|---|
Id | String | Yes | The setting id. |
Examples
Get an existing setting
This example retrieves a specific setting and outputs it as JSON.
# Retrieve a specific setting by id
$setting = Get-Setting -Id "Check for Billing Entries Warning"
Write-Output "Retrieved 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
Write-Output ""
Write-Output "JSON Results:"
$jsonOutput = $setting | ConvertTo-Json -Depth 10
# Output the entity
Write-Output $jsonOutputExecution results:
Retrieved setting 'Check for Billing Entries Warning' (Main Category: #Tasks, Value: False)
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": false,
"ValueAsNumber": null,
"ValueAsDecimal": null,
"ValueAsDate": null,
"SortOrder": 0,
"Locked": false,
"Hidden": false,
"LastUpdatedByFullName": "Max Miller",
"LastUpdatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",
"LastUpdatedOn": "2023-05-06T00:25:55.4028733+00:00",
"LastUpdatedBy": null
}