We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

EXCHANGE 2007 SCRIPTING

happyexchange
on
Medium Priority
469 Views
Last Modified: 2012-05-11
Hi im trying to move email users using this script.  The file is saved as dat01.csv and is saved in Exchange 2007 C:\Documents and Settings\admin.jamiec i have attached the csv file for which i am moving.

Import-Csv dat01.csv | foreach {move-mailbox $_.DisplayName -targetDatabase $_.targetdatabase}

I keep getting this error message (pls see below) Any advice or help wpuld be appreciated. Thank you all

PS] C:\Documents and Settings\admin.jamiec>Import-Csv dat01.csv | foreach {move-mailbox $_.DisplayName -targetDatabase $_.targetdatabase}
Import-Csv : Cannot open file "C:\Documents and Settings\admin.jamiec\dat01.csv
".
At line:1 char:11
+ Import-Csv <<<<  dat01.csv | foreach {move-mailbox $_.DisplayName -targetDatabase $_.targetdatabase}
    + CategoryInfo          : OpenError: (:) [Import-Csv], FileNotFoundExcepti
   on
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.Im
   portCsvCommand
[PS] C:\Documents and Settings\admin.jamiec>

dat01.csv.xls
Comment
Watch Question

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Commented:
Hmmm,
Do a "DIR" to list the files in the directory. it looks as if you have .xls on the end of the CSV name, resave it as .csv

Commented:
Also, make sure you are opeining a elevated (Run as Administrator) EMS powershell session.

Author

Commented:
Thank you all
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.