Newbie Help with Simple Two-Liner - Group Memberships for each user account

I’ve gotten turned around a few times on this and I’m now questioning my overall approach.

I’ve been given an Excel spreadsheet of ~4,000 user accounts and asked to provide a listing of the groups that start with “C_” that each user is a member of. Here’s what I’ve got so far:

[pre]$users = Get-Content (C:\a\users.txt)
foreach ($i in $users) {Get-ADPrincipalGroupMembership $i | where {$.name -Like "C*"} | Select name | Export-Csv .\test.csv -NoTypeInformation -Append}[/pre]

What I’m missing is how to include the respective usernames (whatever $i is) in with the exported CSV so that I can import them into the Excel spreadsheet.

Is this approach sound or is there a better way to tackle this?