This morning I came across an issue that was somewhat interesting, I was trying to enable a user on Lync 2013 but I could not find the user through Lync Control Panel. So l went ahead and launched Lync Management Shell, personally I like working with the Shell a lot more when compared to CP.
In order to enable a user using the shell, we have to use Enable-CsUser command along with the correct parameter, to be quite honest, its a simple command, easy to memorize!
Enable-CsUser -Identity "User" -RegistrarPool "Pool Name" -SipAddress "SIP address of the user"
When I ran this command, I got the following error:
The important thing to note, is that we received the following error:
Enable-CsUser : Cannot move legacy user in enable operation. Use the move user cmdlet instead.
I figured it had something to do with the user’s attributes not properly updating. A few weeks back we migrated all users to the new Lync 2013 pool and decommissioned the old server so we couldn’t just issue a move command and move the user over. The good thing is, we just had to modify the user attribute in ADSIEDIT so that the user could be enabled. The attributes we needed to modify are the following:
When looking through those properties on one of the user accounts, it clearly shows that the msRTCSIP-PrimaryHomeServer is pointing to the old OCS server, the SIP address is filled in and the msRTCSIP-OptionFalgs is set to 256.
We had to clear the attributes so that it is set to “not set” on msRTCSIP-PrimaryHomeServer and msRTCSIP-PrimaryUserAddress, we also had to modify the msRTCSIP-OptionsFlags and set the value to “0” (without quotations). Once cleared, we were now able to find the user through CP or Shell. When the user is enabled, these attributes get repopulated with the correct parameters.