If you're looking at remote workstations, you can try something like this:
 Code:
$RemoteHost = 'workstation27'
$ActiveUserID = WMIQuery('UserName', 'Win32_ComputerSystem', $RemoteHost)[0]
You can then enumerate the CSV file and determine if $ActiveUserID matches anything.

Some helpful UDFs available here on KORG (latest from my web site resources page):
FILEIO()
$aFileData = FileIO('file.csv', 'R') will read the entire file into the $aFileData array.
$aFileData = FileIO('file.csv, 'W', $aFileData) will write the updated array back to the file and reload the array with the new file content.

CSV()
$aRecord = CSV($aFileData[$I]) will take the CSV data from the array and convert it to an array.
$aFileData[$I] = CSV($aRecord) converts the array back to proper CSV format.

So - once you have $ActiveUserID - either remote as shown above or local via @USERID, you can use this to match the user ID and get the associated fields.

 Code:
$ActiveUserID = WMIQuery('UserName', 'Win32_ComputerSystem', $RemoteHost)[0]
$aFileData = FileIO('file.csv', 'R')

For $I = 0 to UBound($aFileData)
  $aRecord = CSV($aFileData[$I])
  If $aRecord[0] = $ActiveUserID
    'Have a match in record ' $I @CRLF

    ; do stuff here for a matched record...

    $I = UBound($aFileData) + 1            ; stop checking records
  EndIf
Next
Glenn

BTW - Welcome to KORG!
_________________________
Actually I am a Rocket Scientist! \:D