Move-CsUser
Topic Last Modified: 2012-03-23
Moves one or more user accounts enabled for Microsoft Lync Server 2010 to a new Registrar pool.
Syntax
Move-CsUser -Identity <UserIdParameter> -Target <Fqdn> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Force <SwitchParameter>] [-PassThru <SwitchParameter>] [-ProxyPool <Fqdn>] [-WhatIf [<SwitchParameter>]]
Detailed Description
The Move-CsUser cmdlet enables you to move a user account enabled for Lync Server 2010 from one Registrar pool to another. Move-CsUser affects only the user’s Lync Server account location; it does not move the user's Active Directory account to a new organizational unit (OU) or other new location.
If Lync Server is coexisting with Office Communications Server 2007 R2 or Office Communications Server 2007, then the Move-CsUser cmdlet can used to move a user back from Lync Server to the legacy installation of Office Communications Server. To move a user back to Office Communications Server, assign the fully qualified domain name (FQDN) of the legacy pool to the Target parameter. If you do this, keep in mind that users moved back to Office Communications Server will likely experience functionality and data loss; that’s because Lync Server has many more capabilities than either Office Communications Server 2007 or Office Communications Server 2007 R2. Users moved back might also need to install previous versions of their client software, and may be required to reschedule meetings that were created when their user accounts were homed on Lync Server.
To move users from Communications Server 2007 or Communications Server 2007 R2 to Lync Server, use the Move-CsLegacyUser cmdlet. Move-CsUser is designed to move users from one Lync Server to another Lync Server pool, or to move a user from a Lync Server pool to an Office Communications Server pool. Move-CsLegacyUser moves users from Office Communications Server to Lync Server.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Move-CsUser cmdlet locally: RTCUniversalUserAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:
Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Move-CsUser"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
UserIdParameter |
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". |
Target |
Required |
FQDN |
The FQDN (for example, atl-cs-001.litwareinc.com) of the Registrar pool where the user account should be moved. In addition to a Registrar pool, the Target can also be the FQDN of a legacy Office Communications Server Front End Server or a hosting provider. Any accounts moved to a hosting provider (for example, Microsoft Lync Online 2010) will lose all their associated user data. For example, any conferences the user has scheduled will be deleted and will not be available in Lync Online 2010. |
DomainController |
Optional |
String |
Enables you to connect to the specified domain controller in order to retrieve contact information. To connect to a particular domain controller, include the DomainController parameter followed by the computer name (for example, atl-cs-001) or its FQDN (for example, atl-cs-001.litwareinc.com). |
ProxyPool |
Optional |
String |
This parameter is used only for Microsoft Lync Online 2010. It should not be used with an on-premises implementation of Lync Server. |
Force |
Optional |
Switch Parameter |
If present, moves the user account but deletes any associated user data (such as conferences that the user has scheduled). If not present, both the account and the associated data are moved. |
PassThru |
Optional |
Switch Parameter |
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. |
WhatIf |
Optional |
Switch Parameter |
Describes what would happen if you executed the command without actually executing the command. |
Confirm |
Optional |
Switch Parameter |
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 |
Input Types
String or Microsoft.Rtc.Management.ADConnect.Schema.ADUser object. Move-CsUser accepts a pipelined string value representing the Identity of a user account that has been enabled for Lync Server. The cmdlet also accepts pipelined instances of the Active Directory user object.
Return Types
Move-CsUser does not return a value or object. Instead, the cmdlet modifies instances of the Microsoft.Rtc.Management.ADConnect.Schema.ADUser object.
Example
-------------------------- Example 1 --------------------------
Move-CsUser -Identity "Pilar Ackerman" -Target "atl-cs-001.litwareinc.com"
In the preceding example, Move-CsUser is used to move the user account with the Identity Pilar Ackerman to the Registrar pool atl-cs-001.litwareinc.com.
-------------------------- Example 2 --------------------------
Get-CsUser -OU "ou=Finance,dc=litwareinc,dc=com" | Move-CsUser -Target "atl-cs-001.litwareinc.com"
In Example 2 all the user accounts in the Finance organizational unit (OU) are moved to the Registrar pool atl-cs-001.litwareinc.com. To carry out this task, the command first uses Get-CsUser 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 Move-CsUser, which moves each account in the collection to the Registrar pool atl-cs-001.litwareinc.com.
-------------------------- Example 3 --------------------------
Move-CsUser -Identity "Pilar Ackerman" -Target "atl-cs-001.litwareinc.com" -Force
In the preceding example, Move-CsUser is used to move the user account with the Identity Pilar Ackerman to the Registrar pool atl-cs-001.litwareinc.com. In addition, the Force parameter is used to ensure that only the account itself is moved; user data associated with that account (such conferences that Pilar has scheduled) will not be moved but will, instead, be discarded. The Force parameter should only be used if you have tried calling Move-CsUser without the parameter and that move failed.