The code for notes.txt is: Get-Content .\modules.txt | Get-Command import-csv .\newusers.csv | select-object -property *, @{name='samAccountName';expression={$_.login}}, @{label='Name';expression={$_.login}}, @{n='Department';e={$_.Dept}}