As mentioned in my previous posts:
Enabling user for Teams Enterprise Voice fails with: "Management object not found for identity"
http://terenceluk.blogspot.com/2020/10/enabling-user-for-teams-enterprise.html
… a user who has previously been enabled for an on-premise Skype for Business Server may still have the msRTCSIP-DeploymentLocator attribute populated with the value SRV: even after they have been removed from the on-premise SfB Server.
Having this value in their user account would prevent them from being enabled for Enterprise Voice in Microsoft Teams and the quick resolution for this would be to remove the attribute, for and AD Connect sync, then try enabling them again.
This solution may be viable for a few accounts but not practical when the amount goes up to the 100s or 1000s so I decided to create a few PowerShell cmdlets to automate the process.
Find SfB Enabled with msRTCSIP-DeploymentLocator Configured Accounts
Get-ADuser -Properties msRTCSIP-DeploymentLocator,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled -Filter {msRTCSIP-DeploymentLocator -like "*" -and msRTCSIP-UserEnabled -eq $true } | Select UserPrincipalName,msRTCSIP-DeploymentLocator,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled
Find SfB Enabled with msRTCSIP-DeploymentLocator Configured as SRV: Accounts
Get-ADuser -Properties msRTCSIP-DeploymentLocator,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled -Filter {msRTCSIP-DeploymentLocator -eq "SRV:" -and msRTCSIP-UserEnabled -eq $true } | Select UserPrincipalName,msRTCSIP-DeploymentLocator,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled
Find SfB Disabled with msRTCSIP-DeploymentLocator Configured as SRV: AND empty msRTCSIP-PrimaryHomeServer Accounts Export as CSV
Get-ADuser -Properties msRTCSIP-DeploymentLocator,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled -Filter {msRTCSIP-DeploymentLocator -eq "SRV:" -and msRTCSIP-UserEnabled -notlike '*' -and msRTCSIP-PrimaryHomeServer -notlike '*'} | Select UserPrincipalName,msRTCSIP-DeploymentLocator,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled | Export-CSV C:\temp\SRVaccounts.csv
Find SfB Disabled with msRTCSIP-DeploymentLocator Configured as SRV: AND empty msRTCSIP-PrimaryHomeServer Accounts and Clear value
**The following cmdlet modifies accounts and I would recommend to export them to a list and review prior to making the changes**
Get-ADuser -Properties msRTCSIP-DeploymentLocator,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled -Filter {msRTCSIP-DeploymentLocator -eq "SRV:" -and msRTCSIP-UserEnabled -notlike '*' -and msRTCSIP-PrimaryHomeServer -notlike '*'} | Set-ADUser -Clear msRTCSIP-DeploymentLocator
The following are the output of some of the cmdlets above.
5 comments:
This was beyond helpful. Thank you. It solved my issue of Teams not applying the Audio Conferencing License fully to a couple users.
this was magic, I was able to remove the SVR from multiple users successfully
Get-ADuser -Properties msRTCSIP-DeploymentLocator -Filter {msRTCSIP-DeploymentLocator -eq "SRV:"} | Set-ADUser -Clear msRTCSIP-DeploymentLocator
I've also been asked about how we can clear all of the msRTCSIP- attributes recently and this can be simply done with the following:
Get-ADUser -Filter * -SearchBase "OU=Accounts,DC=someDomain,DC=int" | Set-ADUser -Clear msRTCSIP-DeploymentLocator
Get-ADUser -Filter * -SearchBase "OU=Accounts,DC=someDomain,DC=int" | Set-ADUser -Clear msRTCSIP-FederationEnabled
Get-ADUser -Filter * -SearchBase "OU=Accounts,DC=someDomain,DC=int" | Set-ADUser -Clear msRTCSIP-InternetAccessEnabled
Get-ADUser -Filter * -SearchBase "OU=Accounts,DC=someDomain,DC=int" | Set-ADUser -Clear msRTCSIP-OptionFlags
Get-ADUser -Filter * -SearchBase "OU=Accounts,DC=someDomain,DC=int" | Set-ADUser -Clear msRTCSIP-PrimaryHomeServer
Get-ADUser -Filter * -SearchBase "OU=Accounts,DC=someDomain,DC=int" | Set-ADUser -Clear msRTCSIP-PrimaryUserAddress
Get-ADUser -Filter * -SearchBase "OU=Accounts,DC=someDomain,DC=int" | Set-ADUser -Clear msRTCSIP-UserEnabled
Thank you! Your post saved me a bunch of time and headaches, greatly appreciate you sharing your wisdom.
hello, great article, what if you have an old version of lync 2013 rtm that you cant invoke the move-csuser command, the environment is hybrid, how do we go about migration as we cant move the users? ultimately we need to get to "teamsonly" mode, how do we achieve this? do we have to clear the on-prem attributes, and follow the 3 steps below?
Change the tenant mode to Teams Only Mode from GUI or Teams PowerShell.
PowerShell
Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Global
To disable shared sip address space run the following command from a Teams PowerShell
Set-CsTenantFederationConfiguration -SharedSipAddressSpace $false
To disable communication between the on-premises environment and Microsoft 365, run the following command from an on-premises PowerShell
Get-CsHostingProvider | Set-CsHostingProvider -Enabled $false
Now you have a Teams Only environment, Hybrid (Shared Sip Address Space) removed.
appreciate any help?
Post a Comment