make an existing script read from a csv file

Hi I have a snippet of power shell code to change the max send email size
SET-Mailbox –Identity Janas –MaxSendSize 1038400
i need the users to be read from a csv file instead any help much appreciated
Who is Participating?
Shabarinath RamadasanConnect With a Mentor Infrastructure ArchitectCommented:
Try this.. Create a CSV file named users.csv

$list = Import-Csv "users.csv"

foreach($samaccountname in $list)
SET-Mailbox –Identity $samaccountname –MaxSendSize 1038400

davidm27Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.