Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Import-CSV, ForEach - PowerShell ISE = cmdlet not recognized

$
0
0

I've been reviewing the other related threads and have yet to find an answer. I'm sure there are some extra braces or quotes that I'm missing. The script prompts for the location of each CSV, whose path gets passed as a variable to be used by Import-CSV. It doesn't get past that point and presents an error stating it doesn't recognize thecmdlet.

The script is here: http://pastebin.com/PnWXqhPv
The error is here: http://pastebin.com/Pg1Ehb0d

I can pass on the CSV files, but they effectively are structured as so:

--
tenant-mailboxes.csv

DisplayName,SamAccountName,UserPrincipalName,FirstName,LastName,Password,Alias
John Doe,john.doe,john.doe@mbu.ca,John,Doe,,john.doe

--
tenant-distribution-groups.csv

DisplayName,Alias
MBU Info,info.mbu

--
tenant-mail-contacts.csv

DisplayName,ExternalEmailAddress,FirstName,LastName,Alias
John Doe,johndoe@externaldomain.com,John,Doe External,john.doe.external

Viewing all articles
Browse latest Browse all 7132

Trending Articles



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