--- title: "Set-FileReference" slug: "scripting-set-filereference" updated: 2026-01-21T14:36:35Z published: 2026-01-21T14:36:35Z canonical: "help.agilityblue.com/scripting-set-filereference" --- > ## 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-FileReference ## Summary Updates an existing file reference. ```powershell Set-FileReference    -Entry ``` Returns a [file reference](https://apidocs.agilityblue.com/#42542659-8ff2-4dee-aaab-2a003f98641c) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | [File Reference](https://apidocs.agilityblue.com/#519118e1-1937-4172-9f19-b582ada8d9aa) Object | Yes | | ## Examples ### Update an existing file reference This example retrieves a file reference, adds a note, and applies the changes. ```powershell # Get the file reference $file = Get-FileReference -Id "6357baac3f8a41989c7aea6f94fd0114" # Add a note to the file reference $file.Notes = "Received from J. Ofarc via email on 2025-01-20" # Update the file reference $file = Set-FileReference -Entry $file Write-Output "Updated file reference '$($file.Name)' (Id: #$($file.Id))" # For debug purposes, convert the entity to output as JSON so we can see the available fields $jsonOutput = $file | ConvertTo-Json -Depth 10 Write-Output "" Write-Output "JSON Results:" # Output the JSON results Write-Output $jsonOutput ``` Execution results: ```json Updated file reference 'Agility Blue REST API OAPIV3.0v001.json' (Id: #6357baac3f8a41989c7aea6f94fd0114) JSON Results: {  "Id": "6357baac3f8a41989c7aea6f94fd0114",  "Name": "Agility Blue REST API OAPIV3.0v001.json",  "MediaType": "application/json",  "Size": 532715,  "SHA256": "a379e7d04538af5dfce60db23e84f6c6b72f4dd0b8090fd2a36077d54dea6427",  "HasMatchingIgnoredFileEntry": false,  "AssociatedObjectTypeId": 5,  "AssociatedObjectTypeName": "Task",  "AssociatedObjectId": 1259,  "AssociatedObjectDisplayName": null,  "AssociatedObjectDisplayReference": null,  "AssociatedObjectParentClientId": null,  "AssociatedObjectParentMatterId": null,  "AssociatedObjectParentProjectId": null,  "AssociatedObjectParentTaskId": null,  "Notes": "Received from J. Ofarc via email on 2025-01-20",  "CreatedByFullName": "Max Miller",  "CreatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",  "CreatedOn": "2025-12-03T13:53:23.12158+00:00",  "CreatedBy": null,  "LastUpdatedByFullName": "Max Miller",  "LastUpdatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a",  "LastUpdatedOn": "2026-01-21T14:34:41.4661849+00:00",  "LastUpdatedBy": null } ```