Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Problem with Import-CSV file to be read in Exchange Shell

$
0
0

Hi Folks

I have a CSV file that contains a list of e-mail addresses in this format:

"Name"

Email1

Email2 

I want to use Get-Mailbox using this script:

$Users =Import-Csv"D:\Scripts\Users.csv"foreach($user in $Users){
$User = $user.Nameset-mailbox -id $User }

But the shell is not able to find all of the users when I do copy/past to CSV, if I type the name manually, it works fine.

Thanks alot for your help


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>