Private numbers are a great thing. They can be used as various scenarios where a person needs a direct private line that’s not published in the contact card and isn’t displayed when you dial out. This is not to be mistaken for Response Groups Agent Anonymity, where agents can call on behalf of themselves or on behalf of the Response Group’s number.
What’s the difference?
Well, first, you can only manage Private Lines via PowerShell. Use the Set-CsUser -PrivateLine cmdlet to assign a user with a private line. When you’ll run the Get-CsUser cmdlet against that user you’ll get everything… Except for the user’s private number. We must use the explicit Get-CsUser sip:firstname.lastname@example.org | fl -PrivateLine cmdlet to get the user’s private number:
PS C:\Windows\system32> get-csuser email@example.com | fl
Identity : CN=Yoav Barzilay,OU=Users,DC=y0av,DC=local
VoicePolicy : Non Restricted
ConferencingPolicy : Allowed
ExchangeArchivingPolicy : Uninitialized
ExternalAccessPolicy : Skype Directory enabled
PersistentChatPolicy : Persistent Chat Enabled
UserServicesPolicy : AllowUnifiedContactStore
HostedVoiceMail : True
HostedVoicemailPolicy : ExchOnline365UM
HostingProvider : SRV:
RegistrarPool : S4bPool1.y0av.local
Enabled : True
SipAddress : sip:Yoav.Barzilay@y0av.local
LineURI : tel:+35864117539;ext=7539
EnterpriseVoiceEnabled : True
ExUmEnabled : False
HomeServer : CN=Lc Services,CN=Microsoft,CN=2:6,CN=Pools,CN=RTC
DisplayName : Yoav Barzilay
SamAccountName : yoav.barzilay
Now if I run the | fl (or | ft) switch with the right parameters, I’ll get what I’m looking for:
PS C:\Windows\system32> Get-CsUser firstname.lastname@example.org | fl Name, LineURI, PrivateLine
Name : Yoav Barzilay
LineURI : tel:+353864117539;ext=7539
PrivateLine : tel:+353857560598;ext=0598
Additionally, Private Numbers have a different behaviour and rules than Primary Lines:
- You can assign only one private line to a user.
- You cannot assign an additional voice mailbox to a private line. However, unanswered calls will be diverted to the voice mailbox if one is configured.
- Unless you decide to push it to the address book, Private Lines are never published on your contact card.
- call forwarding, team call, delegation, team ring, Group Call Pickup, and Response Groups don’t work with Private Lines. Call park and call pickup will work normally.
- When a call arrives to your private line it will display a “Private Number” notification when the call comes in and will have a different ring sound.
- Are you set to “Do Not Disturb”? calls to your private will ignore this setting and will go through anyway.
- Simultaneous ring, if enabled, is enabled on both the Primary and the Private lines.
- Private numbers must be between 3 and 15 numbers in length and must be preceded with the “TEL:” prefix.
So how do you set a number for a user?
Quite simply, to be honest: just run the following:
Set-CsUser sip:email@example.com -PrivateLine "tel:<user's Private number>"
Set-CsUser sip:firstname.lastname@example.org -PrivateLine "tel:+353987654321;ext=4321"
To help you identify all the users in your organization that are configured with a private number, I built the following script:
Run it from your PC (Not from the server!), where you have PowerShell 3.0 or higher and Excel 2010 at least.
The script might require you to change your PS execution policy.
To run the script just start it from an elevated PowerShell Window:
The script will then ask you for your Skype for Business Admin credentials to connect to the remote PowerShell on the server:
The script will run with Excel in the background and will open the file when it’s ready:
Please note this script only shows users configured with Private Numbers. If you’re looking for a way to display all your existing users and devices, please check this post.
Download the Skype for Business Private Numbers Script here.