I had a look at other questions and couldn't find one which helped me with my particular issue, apologies
I have 100+ items in a CSV and I want to put each into two sections of a command. I want this to then be looped through using the following:
$Users = Import-Csv -Path "C:\name\test.csv"
foreach ($user in $users)
{
{
$export = Get-DistributionGroupMember "$user" | Select-Object Identity,Alias,City,Company | Export-Csv "$user.csv"
}
}
What am i looking over?
edit
this is the current output, i'm hoping that the $user would be replaced by each line in the CSV
$csvand$title?{{ }}only one pair is needed withforeach. So what exactly is your problem/question, "looking over" doesn't mean much?