Forum Discussion
Using UseOAuth switch in the move to Teams command for 100Users password doesnt work all the time
could you please run below script and share the outcome.
Try { $save = Import-Csv yarab1.csv -Header Identity } catch { Write-host "Couldnt find the file!! make sure the file located under C:\Temp - File Name: Yarab1.csv" -BackgroundColor Black -ForegroundColor red Write-Warning "File is missing or The process cannot access the file because it is being used by another process." -WarningAction Inquire } foreach ($save in $save1) { Try { $save1 Move-CsUser -Identity $.identity -Target sipfed.online.lync.com -Confirm:$false -UseOAuth -MoveToTeams -Force -BypassAudioConferencingCheck -BypassEnterpriseVoiceCheck -HostedMigrationOverrideUrl https://adminxx.online.lync.com/HostedMigration/hostedmigrationService.svc} catch {Write-Host "An error occurred: $.Identity couldn't be found" -ForegroundColor Yellow -BackgroundColor Red } {catch {Write-Host "Please check if user is enabled in AD or no user object for $.Identity"} Write-Warning "error occurred: moving the user $_.Identity. how do you want to be processed" -WarningAction Inquire } }