Category Archives: Lync

Quick Script: Office 365 License Information for Skype and Teams

I found myself in need of a specific script during a tenant migration, one that only included information about Skype for Business Online and Microsoft Teams.  There wasn’t anything out there that exactly matched what I needed, so I created the following with a bit of reverse engineering and help from support.office.com.  If the script is at all helpful, please feel free to use it, hack it up, send me improvements, whatever you’d like.

The outputs of the script is a CSV and a GridView showing the results of the license data.  The names of the licenses are a bit cryptic, but I’ll summarize them below:

  • TEAMS1- Microsoft Teams
  • MCOSTANDARD – Skype for Business Plan 2
  • MCOMEETADV – Audio Conferencing (formerly PSTN Conferencing)
  • MCOEV – Phone System (formerly Cloud PBX)
  • MCOPSTN1 – Domestic Calling Plan
  • MCOPSTN2 – International Calling Plan
  • MCOPSTNPP – Communication Credits

I’m not certain I grabbed all of the values, so please comment and help me improve the script.

The script itself should be run after you connect to your tenant via PowerShell.  If you’re not sure how, read the following article: https://technet.microsoft.com/en-us/library/dn975125.aspx but in a nutshell, you’ll need to download a PowerShell module and run the Connect-MsolService command.

Once you’re connected, the script to run is here:

$LICENSEOBJECT = @()
$ALLUSERS=Get-MSOLUser -all
$ALLUSERSCOUNT=$ALLUSERS.COUNT
$COUNTER=0

foreach($msolUser in $ALLUSERS)
 {
  $COUNTER++
  $MCOEV=""
  $MCOMEETADV=""
  $MCOSTANDARD=""
  $MCOPSTN1=""
  $MCOPSTN2=""
  $MCOPSTNPP=""  
  $TEAMS1=""

  $UserInfo = Get-MSOLUser -UserPrincipalName $msolUser.UserPrincipalName
  foreach($license in $msolUser.Licenses)
   {
    if ($license.servicestatus|where {$_.serviceplan.servicename -like "MCOEV"}) 
     {
      $MCOEV=$license.servicestatus|where {$_.serviceplan.servicename -like "MCOEV"}
     }
       
    if ($license.servicestatus|where {$_.serviceplan.servicename -like "MCOMEETADV"}) 
     {
      $MCOMEETADV=$license.servicestatus|where {$_.serviceplan.servicename -like "MCOMEETADV"}
     }
     
    if ($license.servicestatus|where {$_.serviceplan.servicename -like "MCOSTANDARD"})
     {
      $MCOSTANDARD=$license.servicestatus|where {$_.serviceplan.servicename -like "MCOSTANDARD"}
     }

    if ($license.servicestatus|where {$_.serviceplan.servicename -like "MCOPSTN1"})
     {
      $MCOPSTN1=$license.servicestatus|where {$_.serviceplan.servicename -like "MCOPSTN1"}
     }

    if ($license.servicestatus|where {$_.serviceplan.servicename -like "MCOPSTN2"})
     {
      $MCOPSTN2=$license.servicestatus|where {$_.serviceplan.servicename -like "MCOPSTN2"}
     }

    if ($license.servicestatus|where {$_.serviceplan.servicename -like "MCOPSTNPP"})
     {
      $MCOPSTNPP=$license.servicestatus|where {$_.serviceplan.servicename -like "MCOPSTNPP"}
     }

    if ($license.servicestatus|where {$_.serviceplan.servicename -like "TEAMS1"})
     {
      $TEAMS1=$license.servicestatus|where {$_.serviceplan.servicename -like "TEAMS1"}
     }
   }

   $LICENSEOBJECT += New-Object PsObject -Property @{
    "DisplayName"="$($UserInfo.DisplayName)"
    "UserPrincipalName"="$($Msoluser.UserPrincipalName)"
    "TEAMS1"=$TEAMS1.ProvisioningStatus
    "MCOEV"=$MCOEV.ProvisioningStatus
    "MCOMEETADV"=$MCOMEETADV.ProvisioningStatus
    "MCOSTANDARD"=$MCOSTANDARD.ProvisioningStatus
    "MCOPSTN1"=$MCOPSTN1.ProvisioningStatus
    "MCOPSTN2"=$MCOPSTN2.ProvisioningStatus
    "MCOPSTNPP"=$MCOPSTNPP.ProvisioningStatus
   }

   write "Processing $($UserInfo.DisplayName) $COUNTER \ $ALLUSERSCOUNT"
 }

#This line creates a CSV for your personal use
$LICENSEOBJECT | SELECT DisplayName,UserPrincipalName,TEAMS1,M* | export-csv License.csv -NoTypeInformation

#This line outputs the data into Out-Gridview
$LICENSEOBJECT | SELECT DisplayName,UserPrincipalName,TEAMS1,M* | Out-GridView

 

 

No Script Needed: List all GPOs related to Skype or Lync for your domain.

I saw a question out there asking if there was a script to list the group policy objects in an organization related to Lync or Skype settings.   I’m not aware of one, but I didn’t really look.  I did know that it was possible to check thanks to Pat Richard’s QOS Calculator which includes a tab that generates the PowerShell code to create a GPO for you (seriously, that’s a heck of a tool).  So, I figured I’d take a break and whip the following command up to answer the question, keep in mind I ran it directly from my domain controller as you’ll need the RSAT installed to get the PowerShell module for the GPO.

Get-GPO -all | foreach { if ((Get-GPOReport -guid $_.id -ReportType XML) -match “Lync|Skype”) {write $_.DisplayName}}

*UPDATE: Pat Richard has already optimized my PowerShell command.  New smaller command can be seen above.

Yes, Your Cloud PBX CNAM Might Be Wrong, But Be Patient

For those of you leveraging Microsoft Skype for Business Online Cloud PBX with a number obtained by using a PSTN Calling License, you might have noticed an outbound call showing up with the wrong CNAM, or Caller ID Name.  While Microsoft has handled many of these already, there are still some out there.    If a user brings this to your attention, you can check using opencnam.com, or a number of other tools.  These can even be scripted to check blocks of numbers.

Once you’ve identified the number with an incorrect CNAM, you’ll need to open a ticket with Microsoft, but please be patient, as of right now we’re hearing that there’s a bit of a backlog handling these.

OpenCnam.com Website Screenshot

New Skype Phone Number Assignment: Failed to Return Unique Result

This is a post that mostly serves as a PowerShell reminder to myself, but the long and short is that I had a client attempting to add a new user with a phone number that they believed wasn’t assigned anywhere.  They had run their favored scripts that list all numbers but were coming up short as to why Skype was blocking them from adding the user.

PS C:\Users\AnthonyCaragol\Desktop> .\Lync_Common_Area_Phone_Tool_v1_2.ps1
 New-CsCommonAreaPhone : Filter failed to return unique result, "[LineURI :
 tel:+16305551212] [PrivateLine : tel:+16305551212] "

As it turns out, and I can’t say how or why at this time (comment if you have a guess), but the account was removed from Lync at some point but the attributes were left behind.    In these situations, the commands I use to trace the line to a user object is as follows (where 5551212 is the number):

get-aduser -filter {msRTCSIP-Line -like "*5551212*"}
get-aduser -filter {msRTCSIP-PrivateLine -like "*5551212*"}

Update:  Jeff Brown has fought issues like this before as well, and has taken the fight right into the databases, see his encounter here – https://www.jeffbrown.tech/single-post/2014/11/01/Cleaning-Up-Leftover-Lync-Accounts

 

AudioCodes IP Phones Certified for Skype for Business Online

In case you missed it, AudioCodes just became the latest phone vendor to become certified for Skype for Business Online, meaning that the 440HD phones can be used both on-premises and online.  Other phones in the series including the 420HD and 450HD should follow shortly.

AudioCodes phones are a very compelling addition to the Skype ecosystem in my opinion due to several factors.

  1. They have the ability to leverage the SILK protocol right on the phone.
  2. The single-vendor aspect for phones, management, and SBC/ATA/Gateway hardware.
  3.  The very competitive price-point.
  4. Their IP phone management suite, which is even available free for up to 500 phones.

You can check out the official press release here for more info:  http://www.audiocodes.com/press-releases/audiocodes-ip-phone-achieves-microsoft-skype-for-business-online-certification

audiocodesjpg

Workaround: Add a Skype Menu Item for Meet Now Dedicated

I’ve had this request from a client and it’s hit TechNet forums as well so I wanted to drop this workaround here.

Issue: When you click Meet Now from the Lync or Skype client, it takes you into a new meeting space, the user would prefer to use their dedicated meeting space.

As the issue states, some people have their dedicated meeting space PSTN conference IDs memorized.  If they want to quickly join a meeting using the IDs they’ve already handed out, rather than whatever method they were using before, they just want a menu item in their client.

The trick I’ve given out is as follows:

  1. Figure out the conference conf: link.
  2. Add the link to a reg key.
  3. Exit and restart the client.

The solution looks like this:

DedicatedMeeting

To get that menu item, paste the following reg key into Notepad and replace the conf: url with the user’s.  Also note that if you’re using Office 2013, replace Office\16.0 with Office\15.0.  To figure out the conf url, just swap out my sip address (anthony.caragol@domain.com) with your user’s, then replace 055VM3JB (my conference ID) with your user’s.  To find your user’s conference ID, you can edit the hyperlink in a new meeting invite (for the dedicated meeting space) and use the alphanumeric ID past the last /.  You can also use my tool here to get this info for all users at once: https://gallery.technet.microsoft.com/Lync-2013-Get-External-deab4539

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\16.0\Lync\SessionManager\Apps\{2F3F07C6-7E0B-462B-AAD7-98C6DBEA8F69}]
“Name”=”Meet Now (Dedicated)”
“Path”=”conf:sip:anthony.caragol@domain.com;gruu;opaque=app:conf:focus:id:055VM3JB%3Frequired-media=audio”
“OriginatorPath”=”conf:sip:anthony.caragol@domain.com;gruu;opaque=app:conf:focus:id:055VM3JB%3Frequired-media=audio”
“SessionType”=dword:00000002
“ApplicationType”=dword:00000001
“ExtensibleMenu”=”MainWindowActions;ContactCardMenu;ConversationWindowActions;MainWindowRightClick”

There are other options too, such as scheduling a recurring meeting at a time that’s not intrusive so it’s always in the meetings section of the client for a quick join.  Comment below if you have a better way or improvement as I imagine there are better methods.

QuickTip: Disable Skype RGS Queue Time-Out or Overflow via PowerShell

Recently on the TechNet forums, someone was attempting to disable a response group queue time-out and overflow programatically within a PowerShell script.  In the control panel, there is an obvious check box, but in the PowerShell object, there is no obvious Boolean equivalent to enable/disable.

WhereToDisableRGS

The simple trick is to set the TimeoutThreshold and OverflowThreshold values to $null instead of a numeric seconds value.

The following simple method will clear both of these checkboxes for you.

$My_RSG_Queue = Get-CSRGSQueue -identity [Your-Queue-Identity]

$My_RSG_Queue.TimeoutThreshold = $null

$My_RSG_Queue.OverflowTheshold = $null

Set-CSRGSQueue $My_RSG_Queue

 

Please Don’t Put Your Skype Edge Internal Interface on the LAN

This has come up on TechNet uncountable times.  I’ve seen it in deployments large and small. I’ve seen it so much that I feel it needs a large font.

TECHNET DOES NOT SUGGEST YOU PUT YOUR EDGE ON THE INTERNAL LAN.  PLEASE DON’T DO THIS.

Every edge server should have two interfaces, one internal facing and one external facing.  I realize that the TechNet documentation doesn’t always use the clearest language and we see articles like this that states “On your internal interface, configure one static IP on the internal perimeter network subnet”.

However, that does not mean your internal network.   A perimeter network is also often called a DMZ.  This is a separate network firewalled from all other networks.

PUTTING YOUR EDGE SERVER WITH ONE LEG IN A DMZ AND ANOTHER ON YOUR INTERNAL LAN BYPASSES YOUR FIREWALL AND IS BAD SECURITY PRACTICE.

Instead, TechNet is suggesting two separate perimeter networks (or DMZs).  An external facing one that can communicate with the Internet via a firewall or with access control, and a separate internal facing one that communicate with internal servers and workstations via a firewall.  These two networks should not be able to route to each other and only necessary ports should be opened.

 

 

 

Where in the Skype Database Can I Find the PSTN Conference ID?

Spoiler: You can’t.

This one has been asked a thousand times on TechNet, and occasionally someone thinks they’ve found it, but they’re wrong.

Many companies want to generate lists of the numeric conference ID found in Skype for Business or Lync meeting invites for the dedicated or private meeting space.  The trick is that although the alphanumeric conference ID can be found in the database (you can see this ID in the URL string generated in the meeting invite), the numerical/DTMF one isn’t stored anywhere.  It’s calculated by an algorithm known only to Microsoft and mapped within the conference directory.   Have I asked for it?  Yes.  Did I get it?  No.  I’ve been told by those within the Microsoft inner circle that the formula cannot be shared publicly, even under NDA.

The format of the actual number is as follows and documented here: https://technet.microsoft.com/en-us/library/gg398802%28v=ocs.15%29.aspx?f=255&MSPPError=-2147217396

<housekeeping digit (1 digit)><conference directory (usually 1-2 digits)><conference number (variable number of digits><check digit (1 digit)>

It is NOT the ConfID stored in the database (although this may well be part of the formula along with PSTN Local ID and PSTN Authority ID).

If someone manages to figure it out using some method, please let me know.  I’ve used DBAnalyze a few times to try to pull it, but I haven’t received consistent results.  My only thought would be a complex EWS scan of calendar directories for the information.

NoPSTNID

 

CloudPBX PSTN Consumption Billing Is Here (And with It, Toll Free)

Finally, a feature I’ve been dying to see in CloudPBX, the ability to add consumption billing for international calling, and with it toll free numbers for conferencing.

Consumption Billing

Up until this announcement, those in the US who wanted to make domestic and international calls needed to use the $24/month plan vs. the $12/month domestic only plan.  While I was happy that international calling was an option, many of my clients need the ability to make international calls, yet rarely actually make them.  The extra $12 per-user per-month for maybe 1-2 international calls a month per person was affecting adoption.  We had workarounds in place like scheduling a conference room to make international calls and only assigning the international plan to conference rooms.  Well, happy to say that’s no longer a workaround we need.  🙂

What hasn’t been announced, and I’ve heard no plans (but I will continue to suggest it), is a lighter domestic plan.  There are also many clients who have users who almost never use the phone but still require a phone number.  Allowing them to have a lighter PSTN Calling plan with consumption billing for overages would also be a welcome addition.

Read more about the announcement here: https://support.office.com/en-us/article/What-is-PSTN-consumption-billing-524dbea7-117f-493d-8005-6461f7f10059

Toll Free Numbers

Toll Free numbers weren’t initially available, and I understand that.  The reality of the situation is that many these days don’t pay additional (or at least very little) for long distance calls and they are losing relevance.  That said, a bigger reality is that it’s a courtesy the vast majority of companies extend and consumers expect it.  Well, with the arrival of PSTN consumption billing, we’ve got ’em now.  🙂

What I wasn’t expecting with this announcement, is all of the countries where toll free numbers are available right out of the gate!  It looks like there may be over 30 countries available if I’m reading this right (full disclosure, I haven’t attempted to obtain a toll free number as of yet).

Read more here:

Where can I get toll free numbers? – https://support.office.com/en-US/article/Where-can-I-get-toll-free-numbers-448bb563-c122-48ce-aab9-a97157a17bd3

Skype for Business toll free number limits and restrictions – https://support.office.com/en-US/article/Skype-for-Business-toll-free-number-limits-and-restrictions-d0b9c232-2970-41cb-adf3-df91f03347c1