Convert Table to Custom PS Object

The command

 openfiles /query /s FILESERVER 
outputs a table as follows:

ID Accessed By Type Open File (Path\executable)
======== ==================== ========== =====================================
36910428 USERNAME Windows D:..\File.txt
30199644 USERNAME Windows D:..\File329.xlsx
37581731 USERNAME Windows D:..\model_4484.doc
12752424 USERNAME Windows D:..\TestFolder
28187627 USERNAME Windows D:..\TestFolder2
232448 USERNAME Windows D:..\Temp55

Storing this table as an array (i.e., $OpenFiles = @(openfiles /query /s FILESERVER)) lets me access the rows like this:

$OpenFiles[0] –> (blank line)
$OpenFiles[1] –> ID Accessed By Type Open File (Path\executable)
$OpenFiles[2] –> ======== ==================== ==========
$OpenFiles[3] –> 36910428 USERNAME Windows D:..\File.txt


etc.

However, since this is not an object with properties (e.g., ID, Accessed By, etc., are not properties), I can’t do:

$OpenFiles[3].AccessedBy –> USERNAME

How do I convert this table to a custom ps object so I can access values that way?

here is an example from powershell - Openfiles query to see open files - Stack Overflow

function Get-OpenFiles {
    cls
    openfiles /query /s $args[0] /fo csv /V | Out-File -Force C:\temp\openfiles.csv
    $search = $args[1]
    Import-CSV C:\temp\openfiles.csv | Select "Accessed By", "Open Mode", "Open File (Path\executable)" | Where-Object {$_."Open File (Path\executable)" -match $search} | format-table -auto
    Remove-Item C:\temp\openfiles.csv
}

Edit: My example was garbage, ugh. Use the /fo csv switch.

$openfiles = openfiles /query /S \\fileserver /FO csv | ConvertFrom-Csv
$openfiles

Thanks guys, using the /FO csv switch worked!