Can someone provide a way to target an input CSV file on this powershell script

Posted on 2014-07-26
Last Modified: 2014-07-27
need assistance modifying this script to read from an input CSV file so that we can migrate users in bulk.

here is the code we are using for one user at a time:
Move-CsUser -Identity -Target -Credential $creds -HostedMigrationOverrideUrl

Open in new window

thx in advance,

Question by:siber1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 67

Accepted Solution

sirbounty earned 500 total points
ID: 40222034
$csv = get-content <path to csv>
foreach ($id in $csv) {
Move-CsUser -Identity $id -Target -Credential $creds -HostedMigrationOverrideUrl

Author Comment

ID: 40222118
thx ..  how can I have it not prompt for each user in the csv?
LVL 67

Expert Comment

ID: 40222383
How is your csv laid out?  It shouldn't prompt, but I'm not familiar with the move-csuser cmdlet

Author Closing Comment

ID: 40222474
thx. worked perfect, just needed to add -confirm:false$ to the end.
LVL 67

Expert Comment

ID: 40223135
Happy to help - thanks for the grade! :^)

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to:…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question