Set-FileReference

Prev Next

Summary

Updates an existing file reference.

Set-FileReference
    -Entry

Returns a file reference object.

Parameters

Parameter

Type

Required?

Notes

Entry

File Reference Object

Yes


Examples

Update an existing file reference

This example retrieves a file reference, adds a note, and applies the changes.

# 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:

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
}