locked
To export Skype for business online users RRS feed

  • Question

  • Hi,


    I need PS command to export Skype for Business online users who is having different SIP and email address.

    Thanks in Advance.

    Regards,
    MS

    Friday, January 4, 2019 5:12 AM

Answers

  • Can we get only licensed users? I am able to extract all unlicensed and blocked users list.

    Between, I modified to  $users = Get-CsOnlineUser

    Yes you can ..

    -------------------

    $users = Get-CsOnlineUser -Filter {WindowsEmailAddress -like"*@test.domain.com"} foreach ($userin$users) { $sipaddress = "sip:" + $user.WindowsEmailAddress if ($Sipaddress-ne$user.SipAddress) { Write-Host $user.DisplayName: $user.WindowsEmailAddress, "mismatch" } }


    • Marked as answer by MadhuSri011 Wednesday, January 9, 2019 12:44 PM
    Friday, January 4, 2019 2:09 PM

All replies

  • Hi Madhu,

    Check each of them to identify which sip addresses do not match e-mail addresses.

    $users = Get-CsUser -filter {WindowsEmailAddress -like "*@yourdomain.com"}

     

    foreach ($user in $users) { $sipaddress = "sip:" + $user.WindowsEmailAddress

    if ($sipaddress -ne $user.SipAddress)

    {

    Write-Host $user.DisplayName : $user.WindowsEmailAddress mismatch

    }

    }

    Also please visit this blog for more info.

    http://powershellblogger.com/2015/10/automate-sip-address-and-upn-name-changes-in-lync-skype-for-business/

    Hope this helps...

    ---------------------------------------------------------------------------------------------------------

    Please don't forget to “mark the replies as answers” if they helped, also set "like" it’s a boost for us to keep blogging J

    Click here to learn more. Visit the dedicated Community forum to shareexplore and talk to experts about Microsoft Kaizala.


    Friday, January 4, 2019 5:27 AM
  • Hi Thuyavan,

    Thanks for the quick response, I am getting the below error..

    Error:

    PS Script: 

    $users = Get-CsUseronline
    -filter {WindowsEmailAddress -like "*@xxxxx.com"}

    foreach
    ($user in $users)

    $sipaddress = "sip:" + $user.WindowsEmailAddress

    if
    ($Sipaddress -ne $user.SipAddress)

    {

    Write-Host
    $user.DisplayName : $user.WindowsEmailAddress mismatch

    }

    }

    ___________

    Thanks,
    Madhu

    Friday, January 4, 2019 5:42 AM
  • Try this 

    $users = Get-CsUseronline
    -filter {WindowsEmailAddress -like "*@xxxxx.com"}
    
    foreach
    ($user in $users)
    { 
    $sipaddress = "sip:" + $user.WindowsEmailAddress
    
    if
    ($Sipaddress -ne $user.SipAddress)
    
    {
    
    Write-Host
    $user.DisplayName : $user.WindowsEmailAddress mismatch
    
    }
    
    }

    Friday, January 4, 2019 5:54 AM
  • still showing error

    PS Command


    $users = Get-CsOnlineUser  -Filter {WindowsEmailAddress -like "*@xxxx.com"}

    foreach ($user in $users)

    $sipaddress = "sip:" + $user.WindowsEmailAddress

    if
    ($Sipaddress -ne $user.SipAddress)

    {

    Write-Host
    $user.DisplayName ; $user.WindowsEmailAddress mismatch

    }
    }

    erorr


    • Edited by MadhuSri011 Friday, January 4, 2019 7:28 AM
    Friday, January 4, 2019 7:28 AM
  • Hi,

    Please try with the following:

    $users = Get-CsOnlineUser  -Filter {WindowsEmailAddress -like "*@test.domain.com"}

     
    foreach ($user in $users)

    $sipaddress = "sip:" + $user.WindowsEmailAddress
     
    if
    ($Sipaddress -ne $user.SipAddress)
     
    {
     
    Write-Host
    $user.DisplayName: $user.WindowsEmailAddress, "mismatch"
     
    }
    }
     

    Kind regards,

    Calvin Liu


    Please remember to mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, January 4, 2019 10:01 AM
  • Hi Madhu,

    Check each of them to identify which sip addresses do not match e-mail addresses.

    $users = Get-CsUser -filter {WindowsEmailAddress -like "*@yourdomain.com"}

     

    foreach ($user in $users) { $sipaddress = "sip:" + $user.WindowsEmailAddress

    if ($sipaddress -ne $user.SipAddress)

    {

    Write-Host $user.DisplayName : $user.WindowsEmailAddress mismatch

    }

    }

    Also please visit this blog for more info.

    http://powershellblogger.com/2015/10/automate-sip-address-and-upn-name-changes-in-lync-skype-for-business/

    Hope this helps...

    ---------------------------------------------------------------------------------------------------------

    Please don't forget to “mark the replies as answers” if they helped, also set "like" it’s a boost for us to keep blogging J

    Click here to learn more. Visit the dedicated Community forum to shareexplore and talk to experts about Microsoft Kaizala.


    Yes I have read the blog, steps are given one by one, didn't tried but i am sure it will work.
    Friday, January 4, 2019 11:00 AM
  • Can we get only licensed users? I am able to extract all unlicensed and blocked users list.

    Between, I modified to  $users = Get-CsOnlineUser

    Friday, January 4, 2019 1:18 PM
  • Can we get only licensed users? I am able to extract all unlicensed and blocked users list.

    Between, I modified to  $users = Get-CsOnlineUser

    Yes you can ..

    -------------------

    $users = Get-CsOnlineUser -Filter {WindowsEmailAddress -like"*@test.domain.com"} foreach ($userin$users) { $sipaddress = "sip:" + $user.WindowsEmailAddress if ($Sipaddress-ne$user.SipAddress) { Write-Host $user.DisplayName: $user.WindowsEmailAddress, "mismatch" } }


    • Marked as answer by MadhuSri011 Wednesday, January 9, 2019 12:44 PM
    Friday, January 4, 2019 2:09 PM
  • Thanks Thuyavan G
    Wednesday, January 9, 2019 12:45 PM
  • Hi Madhu,

    Glad to see your issue is fixed. It was very nice working with you 

    Hope this helps!

    ---------------------------------------------------------------------------------------------------------

    Please don't forget to “mark the replies as answers” if they helped, also set "like" it’s a boost for us to keep blogging J

    Click here to learn more. Visit the dedicated Community forum to shareexplore and talk to experts about Microsoft Kaizala.

    Wednesday, January 9, 2019 1:59 PM