none
Move User cmdlet RRS feed

  • Question

  • I wanted to add a few more people to my Lync server, and before I realized that there was a way to do this in the Lync Control Panel, I used the "delete from communications server" in AD.  Now when I try to add these users, I get "Cannot move user in enable operation.  Use the Move user cmdlet instead."

     

    I've opened up the Lync Management Shell, and I'm assuming the cmdlet is Move-CsUser, but I'm not sure the syntax for it.
    Does anyone know?

    Friday, September 24, 2010 11:21 AM

Answers

  • I did see this same issue in our labs, and the resolution was as follows:

    1. Open ADSI tool.
    2. Locate "My User Account" and open its properties.
    3. Clear "msRTCSIP-UserPolicies" property.

    Afterwards I can enable that user in Lync Server Control Panel, or via Enable-CsUser cmdlet.

    Please let me know if above steps work or not.

    • Marked as answer by hodd Friday, September 24, 2010 1:29 PM
    Friday, September 24, 2010 1:23 PM

All replies

  • So I discovered it's Move-CsUser -Identity "AD Name Here" -target lync.server.here

    but for those users that I trashed with the OCS 2007 AD snap in, I get errors that the user can't be found.  How can I flush everything out about the user for Lync and/or OCS?

    Friday, September 24, 2010 11:41 AM
  • Here's the output from LSMS:
    PS C:\Users\administrator.ORG> Enable-CsUser -Identity "My User Account" -SipAdd
    ress "sip:myuser@lync.local" -RegistrarPool "lync.local"
    Enable-CsUser : Cannot move user in enable operation. Use the Move user cmdlet
    instead.
    At line:1 char:14
    + Enable-CsUser <<<<  -Identity "My User Account" -SipAddress "sip:myuser@local.local" -RegistrarPool "lync.local"
        + CategoryInfo          : InvalidOperation: (:) [Enable-CsUser], InvalidOp
       erationException
        + FullyQualifiedErrorId : ProcessRecord,Microsoft.Rtc.Management.AD.Cmdlet
       s.EnableOcsUserCmdlet

    So I try the Move cmdlet as it states:

    PS C:\Users\administrator.ORG> Move-CsUser -Identity "My User Account" -Target "
    lync.local"
    Move-CsUser : Management object not found for identity "My User Account".
    At line:1 char:12
    + Move-CsUser <<<<  -Identity "My User Account" -Target "lync.local"
        + CategoryInfo          : NotSpecified: (:) [Move-CsUser], ManagementExcep
       tion
        + FullyQualifiedErrorId : Microsoft.Rtc.Management.AD.ManagementException,
       Microsoft.Rtc.Management.AD.Cmdlets.MoveOcsUserCmdlet

    I've tried these commands  (as well as disabling) on accounts that we're added correctly and they work without fail.

     

     

    Friday, September 24, 2010 12:04 PM
  • I did see this same issue in our labs, and the resolution was as follows:

    1. Open ADSI tool.
    2. Locate "My User Account" and open its properties.
    3. Clear "msRTCSIP-UserPolicies" property.

    Afterwards I can enable that user in Lync Server Control Panel, or via Enable-CsUser cmdlet.

    Please let me know if above steps work or not.

    • Marked as answer by hodd Friday, September 24, 2010 1:29 PM
    Friday, September 24, 2010 1:23 PM
  • Yup that did it...thanks!
    • Proposed as answer by Yuan Liu - MSFT Saturday, September 25, 2010 1:25 PM
    Friday, September 24, 2010 1:29 PM
  • Thank you,,, ; )

    Wednesday, September 4, 2013 9:09 PM
  • Thank you, its Ok.
    Thursday, May 9, 2019 9:26 PM