Git Product home page Git Product logo

batchmovetoteams's Introduction

Batch Move To Teams

This script is supposed to help large organizations to automate moving their Skype onprem users to Teams. Optimized to work up to 20 times faster on a large number of users in a batch (several thousands users and more) due to parallel processing. Eliminates most of manual work for Skype/Teams admin with auto retry logic for failed users and comprehensive reporting.

Features

  • Move speed 10-20x faster due to parallel processing
    The script works 10-20 times faster than a traditional one as it executes user moves in parallel as much as possible (but not exceeding the cloud threshold of max user moves at a time)
  • Automatic re-try logic for failed to move users
    For users who failed to move initially (e.g. throttling or some other error) the script will automatically retry them (3 times by default) so you don't have to do it manually
  • Move prerequisite checks
    Sort out and report users who don't meet the prerequisites so that the identified missing prerequisites can be corrected for those users.
  • Rich reporting capabilities
    Script provides comprehensive reporting for every action or check and will report each user processing and results at various stages of migration and also a summary of the results, including how many were moved successfully, how many failed to migrate (grouped by the error message) how many were retried, etc. which is really helpful during the migration to identify bottlenecks and address issues at an early stage

Limitations

  • The script will not work with o365 MFA enforced account
  • The script currently does not support enabling PSTN calling capabilities in Teams (through Calling Plans or Direct Routing) for moved users.

Description

The script will process all users from the input CSV file (InputUsersCsv parameter).

There are 2 main parts of the script:

  1. Check pre-requisites before the move (Use SkipAllPrerequisiteChecks parameter to skip this step)
    Below are the conditions that will trigger user to NOT be moved to Teams only (checks are performed in the order below. If a check fails, further cheks in the list won't be performed):
    • User does not exist onprem (onprem Get-CsUser fails)
    • If OuToSkip parameter is used, skip processing all users in the specified Active Directory Orgasnizational Unit
    • User is already hosted in o365 (HostingProvider is sipfed.online.lync.com)
    • Either LineURI attribute is populated onprem or EnterpriseVoiceEnabled onprem attribute is set to True. You can override this by using ForceSkypeEvUsersToTeamsNoEV command line switch.
    • User is not licensed for Skype and/or Teams in o365
  2. Move to Teams only
    • Users will be moved in parallel batches (works 10-20 times faster than moving users one by one)
    • Users initially failed to move will be retried 3 times by default

Parameters

InputUsersCsv

  • Path to the csv file with users to be moved

ForceSkypeEvUsersToTeamsNoEV

  • By default the script will not move Skype onprem users enabled for Enterprise Voice. If this parameter is used the script will forcefully move those users to Teams without EV functionality

SkipAllPrerequisiteChecks

  • Will not perform any pre-requisite checks and try to move all users specified in the input file

OuToSkip

  • Users located in this Organization Unit in local Active Directory will not be moved to Teams. Can be full OU DN or just a part of it. Wildcards are allowed.

Inputs

A CSV file with user UPNs to be moved from Skype onprem to Teams only. "UPN" (without double quotes) must be the first line (header), than each user's UPN value on a separate line. E.g.:

Outputs

Log file to track the progress and results of the move. The file will be created in the same directory as the input csv file (specified in inputUsersCsv parameter) and have a DateTime stamp appended to its name, e.g.: c:\scripts\teamsmove\MoveResults_02-09-2021_17-15-01.txt

Log file structure. Use Excel to easily analyze:

  • Individual user entries:
    Date/Time, Operation, UPN, Result, Result Details
      e.g.:
        02/16/2021 22:26:23,PrerequisiteCheck,[email protected],ReadyToMove,User is ready to be moved to Teams
        02/16/2021 22:26:24,PrerequisiteCheck,[email protected],Skipped,User not found
  • Summary entries:
    Date/Time, Summary Operation, Succeeded #, Failed #, Time Taken
      e.g.:
        02/16/2021 22:26:25,PrereqSummary,Ready to move: 4,Pre-reqs not met: 3,Time taken: 00:00:04.3187720
        02/16/2021 22:26:34,MoveSummary,Moved Successfully: 4,Failed to move: 0,Time taken: 00:00:09.3513578

Example

BatchMoveToTeams.ps1 -inputUsersCsv "C:\scripts\teamsmove\userlist.csv" -SkipAllPrerequisiteChecks -ForceSkypeEvUsersToTeamsNoEV -OuToSkip "OU=DisabledUsers,DC=contoso,DC=com" 

The above command will:

  • Move users specified in the input csv file (inputUsersCsv parameter)
  • Bypass any prerequisite check SkipAllPrerequisiteChecks (SkipAllPrerequisiteChecks parameter)
  • Will not skip users enabled for Enterprise Voice in Skype onprem (By default Skype EV users are skipped, unless ForceSkypeEvUsersToTeamsNoEV parameter is specified)
  • Skip users in "OU=DisabledUsers,DC=contoso,DC=com" Organizational Unit in local Active directory (OuToSkip parameter)

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

batchmovetoteams's People

Contributors

alexsmel avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

batchmovetoteams's Issues

Function GetHostedMigrationServiceUrl Get-CsTenant with v2.5.0 - Output object changed No more

Get-CsTenant with module MicrosoftTeams v2.5.0 changes : Output object changed No more Identity property
So line 140, it doesn't retrieve information :
[string]$TenantIdentity = (Get-CsTenant).Identity

instead , Use "ServiceInstance" :

$webdir = (Invoke-WebRequest -Uri "https://webdir.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=$domaine").content | ConvertFrom-Json
$webdir = $webdir._links.xframe.href # retrieve webdir Url response
$simpleURL = ("$webdir" -split "/" , 4)[2] # split response
[int]$strStart = 6 #6 is the length of "webdir"
$strLength = $simpleURL.Length - [int]$strStart - 16 #16 is the length of ".online.lync.com"
[string]$HostedMigrationServiceUrl = "https://admin$($simpleURL.Substring([int]$strStart,$strLength)).online.lync.com/HostedMigration/hostedmigrationService.svc"
Return $HostedMigrationServiceUrl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.