0

I have a csv that looks like this:

csv

Column A is the account alias, B is the OU, c is firstname, D is lastname and so on. I want to run the New-Mailbox -Alias firstlast -Name FirstLast -OrganizationalUnit domain/OU -FirstName firstname -LastName lastname - DisplayName "First Last" -UserPrincipalName firstlast@domain.com

How do I get the CSV file to function as the input for these cmdlets? I'm familiar with the Import-CSV cmdlet but I'm unsure of how to get it to work in these specific circumstances.

1 Answers1

1
Import-Csv file.csv | % { New-Mailbox -Alias $_.Alias -Name $_.Name ... }