Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 982
  • Last Modified:

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

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
siber1
Asked:
siber1
  • 3
  • 2
1 Solution
 
sirbountyCommented:
$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
 
siber1Author Commented:
thx ..  how can I have it not prompt for each user in the csv?
0
 
sirbountyCommented:
How is your csv laid out?  It shouldn't prompt, but I'm not familiar with the move-csuser cmdlet
0
 
siber1Author Commented:
thx. worked perfect, just needed to add -confirm:false$ to the end.
0
 
sirbountyCommented:
Happy to help - thanks for the grade! :^)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now