Move-CsUser

Moves one or more user accounts enabled for Skype for Business Server to TeamsOnly (or the reverse). This cmdlet also can be used to move on-premises users from one pool to another.

Syntax

Move-CsUser
    [-Identity] <UserIdParameter>
    [-Target] <Fqdn>
    [-Credential <PSCredential>]
    [-MoveToTeams]
    [-HostedMigrationOverrideUrl <String>]
    [-UseOAuth]
    [-BypassEnterpriseVoiceCheck]
    [-BypassAudioConferencingCheck]
    [-TenantAdminUserName]
    [-ProxyPool <Fqdn>]
    [-MoveConferenceData]
    [-Report <String>]
    [-DomainController <Fqdn>]
    [-Confirm]
    [-Force]
    [-PassThru]
    [-WhatIf]
    [<CommonParameters>]
Move-CsUser
    -UserList <String>
    [-Target] <Fqdn>
    [-Credential <PSCredential>]
    [-MoveToTeams]
    [-HostedMigrationOverrideUrl <String>]
    [-UseOAuth]
    [-BypassEnterpriseVoiceCheck]
    [-BypassAudioConferencingCheck]
    [-TenantAdminUserName]
    [-ProxyPool <Fqdn>]
    [-MoveConferenceData]
    [-Report <String>]
    [-DomainController <Fqdn>]
    [-Confirm]
    [-Force]
    [-PassThru]
    [-WhatIf]
    [<CommonParameters>]

Description

The Move-CsUser cmdlet enables you to move a user account enabled for Skype for Business in the following scenarios:

  • from an on-premises Skype for Business deployment to Teams-only in Microsoft 365 (or the reverse)
  • from one registrar pool to another, in an on-premises Skype for Business Server deployment.

The Move-CsUser cmdlet affects only the user's Skype for Business Server account location; it does not move the user's Active Directory account to a new organizational unit (OU) or other new location.

When moving a user to the Microsoft 365 cloud to become TeamsOnly (or the reverse):

  • Skype for Business hybrid must be configured. For more information, see Deploy hybrid connectivity between Skype for Business Server and Skype for Business Online.
  • To move a user to Microsoft 365, specify the ProxyFqdn of the hosting provider as the Target. In most cases, this is "sipfed.online.lync.com" but in specialized environments, there will be variants of this address. For more details, see Move users between on-premises and cloud.
  • When migrating from on-premises to the cloud, users are automatically assigned TeamsOnly mode and their meetings from on-premises are automatically converted to Teams meetings. This happens regardless of which on-premises version of Skype for Business Server or Lync Server is used. It is no longer necessary to specify the -MoveToTeams switch, and specifying this switch no longer has any impact. Teams-only users can still join meetings hosted in Skype for Business (which may happen if they are invited to a meeting by a user that is using Skype For Business).
  • When migrating from on-premises to the cloud, contacts from Skype for Business Server are migrated to the cloud (unless -force switch is used in move-csuser) and become available in Teams after the user logs on to Teams after the move.
  • If you receive an error while running this cmdlet about multiple federated Edge pools, Skype for Business Federation can only be enabled for a single Edge pool. If you have multiple Edge pools, select one to use as the federating Edge pool.

Note

  • Moving users from On-Premises to Teams requires TLS 1.2. TLS 1.0 and TLS 1.1 have been deprecated. Please visit Disabling TLS 1.0 and 1.1 for Microsoft 365 and Preparing for TLS 1.2 in Office 365 and Office 365 GCC for details.
  • To use Multi-Factor Authentication (MFA) with Move-CsUser requires either Skype for Business Server 2015 CU12 or any version of Skype for Business Server 2019. When using MFA do not specify the -Credential paremeter. If you are using an earlier version of Skype for Business Server, you should either disable MFA and use the credential parameter, or obtain a newer version of the administrative tools for Skype for Business Server that supports MFA.

MINIMUM REQUIRED SERVER VERSIONS:

As of July 31, 2022, moving users between an on-premises deployment and the cloud requires the following minimum version of either Skype for Business Server or Lync Server. In the future, moves between on-premises and the cloud will no longer be possible if you are using a version earlier than the ones listed below. If you are still using an earlier version of Skype for Business Server, you should upgrade to the specified minimum version (or later) before July 31, 2022.



On-premises product Required minimum version Required minimum build
Skype for Business Server 2019 CU6 7.0.2046.385
Skype for Business Server 2015 CU12 6.0.9319.619
Lync Server 2013 CU10 with Hotfix 7 5.0.8308.1182


Examples

EXAMPLE 1: Move a user to Teams

$cred=get-credential
Move-CsUser -Identity "PilarA@contoso.com" -Target "sipfed.online.lync.com" -Credential $cred

In Example 1, the Move-CsUser cmdlet is used to move the user account with sip address PilarA@contoso.com to Teams. This user will now be a Teams only user. If -Credential parameter is not specified, the admin will be prompted for credentials. It no longer matters whether the -MoveToTeams switch is specified.

EXAMPLE 2: Move a user to another on-premises pool

Move-CsUser -Identity "Pilar Ackerman" -Target "atl-cs-001.litwareinc.com"

In Example 3, the Move-CsUser cmdlet is used to move the user account with the Identity Pilar Ackerman to the Registrar pool atl-cs-001.litwareinc.com.

EXAMPLE 3: Move multiple users

Get-CsUser -OU "ou=Finance,dc=litwareinc,dc=com" | Move-CsUser -Target "atl-cs-001.litwareinc.com"

In Example 4, all the user accounts in the Finance organizational unit (OU) are moved to the Registrar pool atl-cs-001.litwareinc.com in on-premises. To carry out this task, the command first uses the Get-CsUser cmdlet and the OU parameter to retrieve a collection of all the user accounts in the Finance OU. After the data has been retrieved, the information is piped to the Move-CsUser cmdlet, which moves each account in the collection to the Registrar pool atl-cs-001.litwareinc.com.

EXAMPLE 4: Move multiple users listed in a file

Move-CsUser -UserList C:\Folder1\Folder2\file1.txt -Target "atl-cs-001.litwareinc.com" -Report C:\Folder1\Folder2\out.csv

In Example 5, all the users listed in file1.txt are moved to the the Registrar pool atl-cs-001.litwareinc.com. Also, a detailed report is created in the out.csv file.

Parameters

-BypassAudioConferencingCheck

This parameter has been deprecated and should not be used.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Server 2015, Skype for Business Server 2019
-BypassEnterpriseVoiceCheck

This parameter has been deprecated and should not be used.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Server 2015, Skype for Business Server 2019
-Confirm

Enables you to bypass the confirmation prompt that would otherwise appear when you attempt to move a user. To bypass the confirmation prompt, include the Confirm parameter using this syntax:

-Confirm:$False

If you would prefer to have the confirmation prompt then use this syntax:

-Confirm

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-Credential

Enables you to run the Move-CsUser cmdlet under alternate credentials, which is typically required when moving to Office 365. To use the Credential parameter you must first create a PSCredential object using the Get-Credential cmdlet. For details, see the Get-Credential cmdlet help topic.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-DomainController

The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.

Type:Fqdn
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-Force

If present, moves the user account without moving contacts or meetings. Contacts and meetings are not recoverable. If not present, both the account and the associated data are moved.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-HostedMigrationOverrideUrl

The hosted migration service is the service in Office 365 that performs user moves. By default, there is no need to specify a value for this parameter, as long as the hosting provider has its AutoDiscover URL properly configured and you are using an admin account the ends in .onmicrosoft.com. If you are using a user account from on-premises that synchronized to the cloud, you must specify this parameter. See Required administrative credentials.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-Identity

Indicates the Identity of the user account to be moved. User Identities can be specified using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). User Identities can also be referenced by using the user's Active Directory distinguished name.

You can use the asterisk () wildcard character when using the Display Name as the user Identity. For example, the Identity " Smith" returns all the users with who have a display name that ends with the string value " Smith".

Type:UserIdParameter
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-MoveConferenceData

When present, moves meeting and conference data for users being transferred to a different Registrar pool. Note that you should only use the MoveConferenceData parameter if you are moving users between on-premises pools and you should not use the MoveConferenceData parameter if you are moving users as part of a disaster recovery procedure. Instead, you should rely on the backup service for moving conference data as part of a disaster recovery procedure.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-MoveToTeams

This parameter is no longer needed. This parameter is only available with Skype for Business Server 2019 and CU8 for Skype for Business Server 2015 and previously was required to move a user directly to TeamsOnly in Microsoft 365. However, when using Move-CsUser, users are now always moved to TeamsOnly, whether this switch is specified or not.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Server 2015, Skype for Business Server 2019
-PassThru

Enables you to pass a user object through the pipeline that represents the user account being moved. By default, the Move-CsUser cmdlet does not pass objects through the pipeline.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-ProxyPool

This parameter has been deprecated and should not be used.

Type:Fqdn
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-Report

A CSV file to be created with detailed information about the move. You can supply the file name if you want to create the file in the current folder, or an absolute path.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Server 2015, Skype for Business Server 2019
-Target

If moving to an on-premises pool (either from another pool or from Microsoft 365), this is the FQDN (for example, atl-cs-001.litwareinc.com) of the Registrar pool where the user account should be moved.

If moving to Microsoft 365, this must be set to the ProxyFqdn value of the hosting provider. In most cases this is sipfed.online.lync.com. The value of the ProxyFqdn can be obtained using Get-CsHostingProvider

Type:Fqdn
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019
-TenantAdminUserName

This is an optional parameter that if, specified, pre-populates the username of the tenant admin when moving users to or from Office 365. This can be useful for scenarios involving smart card authentication or 2 factor auth. This parameter is only available with Skype for Business Server 2019 and CU8 for Skype for Business Server 2015. When specifying this parameter on Skype for Business Server 2015 with CU8, you must also specify the UseOAuth parameter.

Type:UserIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Server 2015, Skype for Business Server 2019
-UseOAuth

This switch is only relevant for Skype for Business Server 2015 with CU8 up to CU11. When using those versions, this switch is now required. It ensures authentication between on-premises and the host migration service is based on OAuth protocol. In Skype for Business Server 2019 as well as Skype for Business Server 2015 CU12 and later, OAuth is always used hence the switch is not relevant on those versions.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Server 2015
-UserList

A text file with a list of users to be moved, in the following format example: "sip:user1@contoso.com,sip:user2@contoso.com,sip:user3@contoso.com". You can supply the file name if it's located in the current folder, or the absolute path to the file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Server 2015, Skype for Business Server 2019
-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

String

The Move-CsUser cmdlet accepts a pipelined string value representing the Identity of a user account that has been enabled for Skype for Business Server.

Microsoft.Rtc.Management.ADConnect.Schema.ADUser

The cmdlet also accepts pipelined instances of the Active Directory user object.

Outputs

None

The Move-CsUser cmdlet does not return a value or object. Instead, the cmdlet modifies instances of the Microsoft.Rtc.Management.ADConnect.Schema.ADUser object.