Solved

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

Posted on 2014-07-26
5
806 Views
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 john_smith@mydomain.com -Target sipfed.online.lync.com -Credential $creds -HostedMigrationOverrideUrl https://admin0a.online.lync.com/HostedMigration/hostedmigrationservice.svc

Open in new window


thx in advance,

S.
0
Comment
Question by:siber1
  • 3
  • 2
5 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 40222034
$csv = get-content <path to csv>
foreach ($id in $csv) {
Move-CsUser -Identity $id -Target sipfed.online.lync.com -Credential $creds -HostedMigrationOverrideUrl https://admin0a.online.lync.com/HostedMigration/hostedmigrationservice.svc
}
0
 

Author Comment

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

Expert Comment

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

Author Closing Comment

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

Expert Comment

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

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This video discusses moving either the default database or any database to a new volume.

775 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