Найти отключенных в AD пользователей активных в SfB

If you’ve not been disabling users in Lync while disabling them in AD, here’s a one liner to find those users:

Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match “AccountDisabled” -and $_.Enabled -eq $true} | Format-Table Name,Enabled,SipAddress -auto

You can shorten it somewhat by not checking if $_.Enabled is $true, but just that it exists. You can get a count of the users using:

Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match “AccountDisabled” -and $_.Enabled} | Measure-Object

and, if you want, can disable them in one line using

view sourceprint?

Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match “AccountDisabled” -and $_.Enabled} | Disable-CsUser

SfB – ищем кому присвоен номер

SfB вернул “Filter failed to return unique result” при попытке назначить номер

Симптом:
Вы получаете следующее сообщение об ошибке при попытке присвоить номер телефона пользователю с включенным Enterprise Voice PowerShell или Lync Admin Web GUI:

Filter failed to return unique result, «[SipAddress : sip:ivan.ivanov@contoso.com] [LineURI : tel:+2222] [PrivateLine : tel:+2222] «

Решение :
Выполните команды ниже, чтобы найти кому этот номер определён.

Ищем номер телефона +2222
Users:
Get-CsUser | where {$_.LineURI -eq “tel:+2222” -or $_.PrivateLine -eq “tel:+2222”} | Sort-Object LineURI | Select-Object Displayname, LineURI, PrivateLine, Identity

Common Area Phone:

Get-CsCommonAreaPhone | where {$_.LineURI -eq “tel:+2222”} | Sort-Object LineURI | Select-Object Identity, LineURI, DisplayNumber, DisplayName, Description

Workflow:
Get-CsRgsWorkflow | where {$_.LineURI -eq “tel:+2222”} | Sort-Object LineURI | Select-Object Name, Identity, LineURI, DisplayNumber, Description

Exchange UM Contact:
Get-CsExUmContact | where {$_.LineURI -eq “tel:+2222”} | Sort-Object LineURI | Select-Object identity, LineURI

 

get-ummailbox | ForEach { If($_.Extensions -eq 4322){$.DisplayName}}

get-ummailbox | where { $_.Extensions -eq “45873” }

Get-Recipient -ResultSize Unlimited | where{$_.emailaddresses -like “*EUM:*2222*”} | fl displayname,emailaddresses

SfB – установка обновления KB2982006

При публикации топологии возникает ошика с требованием установить обновление KB2982006. Но штатно установить его нельзя, т.к. система рукается на несовместимость обновления и системы.

Решение – установка обновления средствами DISM.

  • Проверяем наличие обновления Get-Hotfix KB2982006
  • Распоковываем его в заранее созданный каталог Expand -F:* C:\Temp\Windows8.1-KB2982006-x64.msu C:\Temp\KB2982006
  • Устанавливаем dism /Online /Add-Package /PackagePath:C:\Temp\KB2982006\Windows8.1-KB2982006-x64.cab

Спасибо David Paulino

Украдено по ссылке https://blogs.technet.microsoft.com/uclobby/2017/09/05/sfb-server-cannot-install-kb2982006-this-update-is-not-applicable-to-your-computer/

 

Polycom VVX300 – сменить профайл для работы в SfB

To set the Base Profile to Skype Using MKC during startup:

  • Power on the phone or restart it after you have reset the phone to factory default settings.
  • A few seconds into the device’s startup cycle, the phone displays the message ‘Starting Application’,
    press Cancel to interrupt and a Cancel soft key. Press the Cancel soft key.
  • When the phone displays three soft keys—Start, Setup, and About—press and hold the following
    key combinations on the phone keypad for about 3 seconds to enter the MKC for the phone model:
    VVX 300, 310, 400, 410, 500, 600, 1500, press 1, 4, 9
    Note: When you use configuration files to provision the phones with Skype for Business, the
    phone Base Profile stays set to Generic. You do not need to set the Base Profile feature on the
    phones to Skype for Business when provisioning with configuration files. Deploying Polycom Phones with Skype for Business
  • Press and hold the MKC keys to cause the Base Profile Password menu to display. Enter the
    password (default 456) to change the Base Profile and press Ok.
    The Base Profile menu displays.
  • Press the Edit soft key, use the keypad keys to set the Base Profile to Skype, and press Ok > Exit.
  • Highlight Save & Reboot and press the Select soft key.

The phone reboots and displays the Sign In screen. Users can now sign in.

SfB – “A call to a PSTN number failed due to non availability of gateways.”

В логах очень часто возникают ошибки “A call to a PSTN number failed due to non availability of gateways.
Описание и решение ниже по ссылке.

Спасибо автору – Y0AV. WITH A ZERO.!
“The odd call drops” of the Mediation Server

I had a very annoying issue lately when an installation of a new gateway resolved in some calls (specifically to US numbers) dropped by the Skype for Business mediation server saying “A call to a PSTN number failed due to non availability of gateways.

The cause, according to the mediation server, was that “All gateways available for this call are marked as down“, and the resolution, surprisingly, was to “Verify that these gateways are up and can respond to calls.”

It seemed funny, because all other calls were successful, I have not exhausted the available PRI channels I had, the gateway didn’t seem to lose connectivity for a split second and SIP options are accepted and replied to on both ends.

Looking further at the Lync Monitoring Reports, I noticed the following:

Reported by Client
12000; reason=”Routes available for this request but no available gateway at this point”

Reported by Server
12000; reason=”Routes available for this request but no available gateway at this point”

I went to the gateway (AudioCodes M1000B) for answers and the logs were showing something very weird;

Every call starts with the same flow:

Flow1The mediation server sends a SIP Invite that will normally be answered immediately by the gateway with a “100 Trying”. This, for me, will close the deal on the “Gateway no responding” – this is a great response if you ask me.
The next phase would be the gateway immediately sending a “PSTN Place call” to the PSTN, hopefully receiving a “Proceeding” instantly from the PSTN, meaning so far we’re fully communicating. So for the time being I’m not really buying what the Lync mediation server is selling.

Looking further at the logs, I see the following strange behaviour:
As I’m still waiting for the PSTN to connect the call (this would normally be a “PSTN Call Alerting” message), I see that the mediation server decided to abandon ship!
This is what I see in the logs:

Wrong

Within 10 seconds after initiating the call, the mediation server will send a “Cancel” request to the gateway and will terminate the call:

19:25:49.640 [S=660986] [SID:1327438938] INVITE sip:+353857560598@10.10.10.1;user=phone SIP/2.0 
19:25:49.729 [S=661027] [SID:1327438938] SIP/2.0 100 Trying 
19:25:49.730 [S=661035] [SID:1327438938] (   lgr_psbrdif)(    656225)   pstn send --> PlaceCall
19:25:50.087 [S=661039] [SID:1327438479] (   lgr_psbrdex)(    656229)   pstn recv <-- CALL_PROCEEDING
19:25:59.020 [S=661055] [SID:1327438938] CANCEL sip:+353857560598@10.10.10.1;user=phone SIP/2.0 
19:25:59.052 [S=661061] [SID:1327438938] SIP/2.0 200 OK 
19:25:59.058 [S=661065] [SID:1327438938] SIP/2.0 487 Request Terminated 
19:25:59.079 [S=661074] [SID:1327438938] (   lgr_psbrdif)(    656265)   pstn send --> PSTNDisconnectCall

Clearly, the gateway is available and responding, but the mediation server is somewhat impatient.

Doing a bit of digging around, it appears there’s a setting for this.

The Lync mediation server is expecting a “SIP 180 Ringing” within 10 seconds of initiating the call. Failing to provide that (183 “Session in Progress” can be pushed here but that won’t benefit you if you’re still waiting for that ring…) will cause the mediation server to decide that the call didn’t respond and to mark the gateway as unavailable. A little too harsh? In my opinion yes. This will generate errors (2 per failed call) on your Lync servers and is actually a Lync self-inflicted error.

To work around this issue you can go to:
<Lync or Skype for Business installation folder\Server\Core
and look for a file called “OutboundRouting.exe.config“.
When you open that file, the first configuration line is:
<add key=”FailOverTimeout” value=”10000″/>
This actually determines how long should a call wait for the gateway until it declares it “Offline”. the value is in milliseconds, meaning the default setting is 10 seconds.

This will impact your environment if you have two or more gateways, and it means that it’ll take the mediation servers more than 10 seconds to declare that gateway as offline if it actually fails.

For me to workaround that issue I extended the wait time to 20 seconds, restarted the front-end and mediation services, and all of a sudden no call was dropped.

It appears it took the carrier approx. 12 seconds to generate the “PSTN Call Alerting” command to the gateway. For some reason, only calls to the US (and only with this specific carrier) were affected by this issue.

Now, I can see all my calls working perfectly and the errors have disappeared from the serves too.

DHCP на Cisco для CX500/CX600

Configuring Lync DHCP using Cisco DHCP Servers (VLAN and PIN Auth)
http://www.shudnow.net/2011/05/02/configuring-lync-dhcp-using-cisco-dhcp-servers-vlan-and-pin-auth/
Не моё, но честно украдено. Спасибо Elan Shudnow

PIN Authentication Settings

STEP 1

Run DHCPUtil.exe to find out hex data values for DHCP Options 120 and 43

C:\Program Files\Microsoft Lync Server 2010\> DHCPUtil.exe -sipserver  pool01.contoso.com

Sip Server FQDN:  pool01.contoso.com

Certificate Provisioning Service URL:  https://pool01.contoso.com:443/CertProv/CertProvisioningService.svc

Option 120: 00076578616D706C6503636F6D00

Vendor Class Identifier: MS-UC-Client

Option 43 (for vendor=MS-UC-Client):

Sub-Option 1 <UC Identifier>: 4D532D55432D436C69656E74

Sub-Option 2 <URL Scheme>: 6874747073

Sub-Option 3 <Web Server FQDN>: 6578616D706C652E636F6D

Sub-Option 4 <Port>: 343433

Sub-Option 5 <Relative Path for Cert Prov>: 2F4365727450726F762F4365727450726F7669736

96F6E696E67536572766963652E737663

STEP 2

Build DHCP Option 120 hex value for Cisco DHCP using DHCPUtil.exe output info

Option 120 = hex 00076578616D706C6503636F6D00

STEP 3

Build DHCP Option 43 hex value for Cisco DHCP using DHCPUtil.exe output info

Note:  Format of DHCP Option 43 hex value:

Sub-Option 1 Sub-Option 2 Sub-Option 3 Sub-Option 4 Sub-Option 5
01 Length Data 02 Length Data 03 Length Data 04 Length Data 05 Length Data
    1. Compile Sub-Option 1 from DHCPUtil.exe output:

Length of data is hex value for (number of characters of Data) divided by 2 ( # of chars / 2 )

    1. Compile Sub-Option 2 from DHCPUtil.exe output:
Sub-Option2
02 Length of data Data
02 05 6874747073
    1. Compile Sub-Option 3 from DHCPUtil.exe output:
Sub-Option3
03 Length of data Data
03 0B 6578616D706C652E636F6D
    1. Compile Sub-Option 4 from DHCPUtil.exe output:
Sub-Option4
04 Length of data Data
04 03 343433
    1. Compile Sub-Option 5 from DHCPUtil.exe output:
Sub-Option5
05 Length Data
05 25 2F4365727450726F762F4365727450726F766973696F6E696E67536572766963652E737663

STEP 4

Combine the five Sub-Option values to build the DHCP Option 43 hex value for Cisco DHCP:

Compiled DHCP Option 43:

Sub-Option1 Sub-Option2 Sub-Option3 Sub-Option4 Sub-Option5
01 Length Data 02 Length Data 03 Length Data 04 Length Data 05 Length Data
010C4D532D55432D436C69656E7402056874747073030B6578616D706C652E636F6D040334343305252F4365727450726F762F4365727450726F766973696F6E696E67536572766963652E737663

VLAN ID Settings with PIN Authentication Settings

There are a few ways to make this work:

  • Link Layer Discovery Protocol (LLDP)
  • Two different ways to make it work on DHCP.  DHCP is what this article will cover.

Now let’s say we have two VLAN IDs: 208 (Data) and 209 (Voice) on the same ports.  The idea here is swap the phone from the Data VLAN to the Voice VLAN. As stated earlier, we found two methods in configuring the VLAN ID Settings.  The first I will show is how it worked on a switch that supported LLDP – Catalyst 4507R – SUP-IV IOS version (cat4500-ENTSERVICESK9-M), Version 12.2(54)SGI.  The second is how it worked on the switch that was not LLDP Capable – Catalyst 6513 SUP720 (S72033_rp-PK9SV-M), Version 12.2(18)SXD7 – or higher.  Thanks to my client for enduring the painful process of figuring out the below and providing me with information and explanations on what he did to get the Cisco DHCP configured for VLAN ID as well as the switch information provided which you can see in the first two comments in this article.

LLDP Switch Data Scope (Comments in Red)

ip dhcp pool Data14_Lync (VLAN 208)

option 10 hex 00d0 (Decimal 209)

option 60 ascii “CPE-OCPHONE”

LLDP Switch Voice Scope (Comments in Red)

ip dhcp pool Voice14_Lync (VLAN 209)

option 10 hex 00d0 (Decimal 209)

option 60 ascii “CPE-OCPHONE”

option 43 hex 010C4D532D55432D436C69656E7402056874747073030B6578616D706C652E636F6D040334343305252F4365727450726F762F4365727450726F766973696F6E696E67536572766963652E737663

option 120 hex 00076578616D706C6503636F6D00

Non-LLDP Switch Data Scope (Comments in Red)

When we noticed the LLDP Switch Scope configuration wouldn’t work on a non-LLDP Switch, we tried running this on Windows DHCP.  My client sniffed the traffic and found that Windows DHCP had some 43 option information passed back to the client for the VLAN ID information.  So what we did in option 43 is specify an option 10 sub-option.  The oa is the sub option. The 02 is the length of the data field divided by 2.  The 00d1 is the hex value of the data vlan.

ip dhcp pool Data14_Lync

option 43 hex 0a0200d1

Non-LLDP Switch Voice Scope

ip dhcp pool Voice14_Lync

option 120 hex 00076578616D706C6503636F6D00

option 43 010C4D532D55432D436C69656E7402056874747073030B6578616D706C652E636F6D040334343305252F4365727450726F762F4365727450726F766973696F6E696E67536572766963652E737663

Keyboard shortcuts for Skype for Business

горячие клавиши в очередной раз изменили и теперь принять вызов это “Windows logo key+Shift+O”

https://support.office.com/en-ca/article/Keyboard-shortcuts-for-Skype-for-Business-42ff538f-67f2-4752-afe8-7169c207f659

ранее же я использовал именно “Windows logo key+A” по ссылке

https://support.office.com/en-ca/article/Keyboard-shortcuts-for-Skype-for-Business-Lync–74eda765-5631-4fc1-8aad-cc870115347a?ui=en-US&rs=en-CA&ad=CA

Copying Lync Server Policies

Периодически возникает потребность скопировать политику, но к сожалению штатных средств для этого нету.

НО! Можно экспортировать все параметры и импортировать в новую создаваемую политику.

  1. Get-CsVoicePolicy –Identity “RedmondVoicePolicy” | Export-Clixml –Path “C:\Backups\RedmondVoicePolicy.xml”
  2. В блокноте изменить имя политики на то что нам необходимо. <S N=”Identity”>Tag:RedmondVoicePolicy</S>
  3. Import-Clixml –Path “C:\Backups\RedmondVoicePolicy.xml” | Set-CsVoicePolicy

украдено тут

Найти объекты в пуле

При удалении пула и публикации топологии нередко возникает ошибка
“Error: An error occurred: “System.InvalidOperationException” “Cannot publish topology changes. Users or contacts are still homed on a pool that would be deleted. Move or remove the users or contacts before continuing.””

Однако нам не удаётся найти те самые объекты.
Нам поможет очень хороший скрипт FindObjectsInThePool.ps1
описание и ссылка для скачки ниже:
https://gallery.technet.microsoft.com/office/Users-or-contacts-are-0d89422b

1. Copy attached FindObjectsInThePool.ps1 file to any directory on Lync Server.
2. Open Lync Server Management Shell.
3. Browse to directory with FindObjectsInThePool.ps1 file.
4. Run “FindObjectsInThePool.ps1 lyncpool2010.domain.local’. (your 2010 pool name)

<#
Run get-CsPool to find pool’s FQDN
Run “.\FindObjectsInThePool <pool FQDN>”
Example (if pool name is lyncpool.domain.local): “.\FindObjectsInThePool lyncpool.domain.local”
#>

param([String]$poolName)

$Pool=Get-CsPool -Identity $poolName -ErrorAction SilentlyContinue

#Check if pool name was entered
if (-Not $poolName) {
Write-Host ‘You did not enter pool name’ -ForeGroundColor Yellow
Write-Host ‘You can run ‘ -NoNewline -ForeGroundColor Yellow
Write-Host ‘get-CsPool’ -NoNewline -ForeGroundColor Red
Write-Host ‘ command to find FQDN of the pool.’ -ForeGroundColor Yellow
Write-Host ‘Run ‘ -NoNewline -ForeGroundColor Yellow
Write-Host ‘.\FindObjectsInThePool <pool FQDN>’ -ForeGroundColor Red
Write-Host ‘Example (if pool name is lyncpool.domain.local): ‘ -NoNewline -ForeGroundColor Yellow
Write-Host ‘.\FindObjectsInThePool lyncpool.domain.local’ -ForeGroundColor Red
}

#Check if pool name was correct
elseif (-Not $Pool){
Write-Host ‘Lync Pool ‘ -NoNewline -ForeGroundColor Yellow
Write-Host $poolName -NoNewline -ForeGroundColor Red
Write-Host ‘ was not found. Please try again.’ -ForeGroundColor Yellow
Write-Host ‘You can run ‘ -NoNewline -ForeGroundColor Yellow
Write-Host ‘get-CsPool’ -NoNewline -ForeGroundColor Red
Write-Host ‘ command to find FQDN of the pool.’ -ForeGroundColor Yellow
Break
}

else {
$user = Get-CsUser | Where-Object {$_.RegistrarPool -like $poolName} | Sort-Object Displayname | ft DisplayName, LineURI
if (!$user) {
Write-Host ”
Write-Host ‘[No Users found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[User(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$user

$cap = Get-CsCommonAreaPhone | Where-Object {$_.RegistrarPool -like $poolName} | Sort-Object DisplayName | ft DisplayName, DisplayNumber
if (!$cap) {
Write-Host ”
Write-Host ‘[No Common Area Phones found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Common Area Phone(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$cap

$exumcontact = Get-CsExUmContact | Where-Object {$_.RegistrarPool -like $poolName} | Sort-Object DisplayName | ft DisplayName, LineURI
if (!$exumcontact) {
Write-Host ”
Write-Host ‘[No Exchange UM Contacts found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Exchange UM Contact(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$exumcontact

$workflow = Get-CsRgsWorkflow | where {$_.OwnerPool -eq $poolName} | Sort-Object Name | ft Name, LineURI, DisplayNumber
if (!$workflow) {
Write-Host ”
Write-Host ‘[No Workflows found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Workflow(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$workflow

$analogd = Get-CsAnalogDevice | Where-Object {$_.RegistrarPool -like $poolName} | Sort-Object DisplayName | ft DisplayName, LineURI, DisplayNumber
if (!$analogd) {
Write-Host ”
Write-Host ‘[No Analog Devices found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Analog Devices(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$analogd

$confd = Get-CsConferenceDirectory | Where-Object {$_.ServiceID -like ‘*’ + $poolName} | Sort-Object Identity | ft Identity
if (!$confd) {
Write-Host ”
Write-Host ‘[No Conference Directories found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Conference Directory(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$confd

$callpark = Get-CsCallParkOrbit | Where-Object {$_.CallParkServerFQDN -match $poolName} | Sort-Object Identity | ft Identity
if (!$callpark) {
Write-Host ”
Write-Host ‘[No Call Park Orbits found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Call Park(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$callpark

$unnumbers = Get-CsUnassignedNumber | Where-Object {$_.AnnouncementServerFqdn -eq $poolName} | Sort-Object AnnouncementName | ft AnnouncementName, NumberRangeStart, NumberRangeEnd
if (!$unnumbers) {
Write-Host ”
Write-Host ‘[No Unassigned Numbers found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Unassigned Number(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$unnumbers

$endpoints = Get-CsApplicationEndpoint | Where-Object {$_.RegistrarPool -like $poolName} | Sort-Object DisplayName | ft DisplayName, LineURI
if (!$endpoints) {
Write-Host ”
Write-Host ‘[No Application Endpoints found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Application Endpoint(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$endpoints

$tendpoints = Get-CsTrustedApplicationEndpoint | Where-Object {$_.RegistrarPool -like $poolName} | Sort-Object DisplayName | ft DisplayName, DisplayNumber, LineURI
if (!$tendpoints) {
Write-Host ”
Write-Host ‘[No Trusted Application Endpoints found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[Trusted Application Endpoint(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$tendpoints

$dialconf = Get-CsDialInConferencingAccessNumber | Where-Object {$_.Pool -like $poolName} | Sort-Object DisplayName | ft DisplayName, DisplayNumber, LineURI
if (!$dialconf) {
Write-Host ”
Write-Host ‘[No DialIn Conferencing Access Numbers found in the’$poolName’ pool]’ -ForeGroundColor Red
}
else {
Write-Host ”
Write-Host ‘[DialIn Conferencing Access Number(s) found in the’$poolName’ pool]’ -ForeGroundColor Red
}
$dialconf
}