Skip to content

Instantly share code, notes, and snippets.

@jhochwald
Created September 13, 2017 18:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhochwald/6198dcbae0a333a48b7c9880e7c7969a to your computer and use it in GitHub Desktop.
Save jhochwald/6198dcbae0a333a48b7c9880e7c7969a to your computer and use it in GitHub Desktop.
Skype for Business should use Proxy Server
<#
.SYNOPSIS
Skype for Business should use Proxy Server
.DESCRIPTION
Skype for Business should use Proxy Server to sign in instead of trying a direct connection.
Works with Skype for Business 2015 and 2016 and should work with Lync 1013 as well.
.EXAMPLE
PS C:\> .\Set-Skype4BProxyUsage.ps1
.NOTES
Please note: This is a per user setting!
SIP is not used between Clients (aka P2P or Cleint to Client).
It wil be used between Client and Server and/or Server and Server.
Media Bypass will be used for RTP media between Clients (when possible)
.LINK
https://support.microsoft.com/en-us/help/3207112/skype-for-business-should-use-proxy-server-to-sign-in-instead-of-tryin
.LINK
https://blogs.technet.microsoft.com/uclobby/2016/12/08/enabling-lyncsfb-client-to-use-proxy-server-for-sip-traffic-instead-of-trying-direct-connection/
#>
[CmdletBinding()]
param ()
$parameters = @{
Path = 'HKCU:\Software\Microsoft\UCCPlatform\Lync'
Name = 'EnableDetectProxyForAllConnections'
PropertyType = 'DWORD'
Value = '1'
Force = $true
ErrorAction = 'Stop'
WarningAction = 'SilentlyContinue'
}
try
{
$null = (New-ItemProperty @parameters)
Write-Verbose -Message 'New value set.'
}
catch
{
try
{
$null = (Set-ItemProperty @parameters)
Write-Verbose -Message 'Existing value modified.'
}
catch
{
Write-Warning -Message 'Unable to create/set the value.'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment