Added Files
This commit is contained in:
@@ -0,0 +1,824 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Create the S4B Client QoS Group Policy
|
||||
|
||||
.DESCRIPTION
|
||||
Create the Skype for Busines related Quality of Services Client Group Policy
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\Client_GPO.ps1
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\Client_GPO.ps1 -verbose
|
||||
|
||||
.NOTES
|
||||
Check that the ports and port ranges fit your requirements!
|
||||
|
||||
The ports and ranges we use here should fit the Skype for Business Online setup
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param ()
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
BEGIN
|
||||
{
|
||||
#region Variables
|
||||
|
||||
# Ports to use for Application Sharing
|
||||
[string]$AppSharePorts = '50040:50059'
|
||||
|
||||
# QoS marking for Application Sharing
|
||||
[string]$AppShareMark = '24'
|
||||
|
||||
# Ports to use for Video
|
||||
[string]$VideoPorts = '50020:50039'
|
||||
|
||||
# QoS marking for Video
|
||||
[string]$VideoMark = '34'
|
||||
|
||||
# Ports to use for Audio
|
||||
[string]$AudioPorts = '50000:50019'
|
||||
|
||||
# QoS marking for Audio
|
||||
[string]$AudioMark = '46'
|
||||
|
||||
# Ports to use for File Transfer
|
||||
[string]$FileTransferPorts = '5350:5369'
|
||||
|
||||
# QoS marking for File Transfer
|
||||
[string]$FileTransferMark = '14'
|
||||
|
||||
# Legacy Media Ports (OCS 2007 R2 Media)
|
||||
[string]$LegacyMediaPorts = '5370:5389'
|
||||
|
||||
# Lync SIP Ports
|
||||
[string]$LyncSipPorts = '5390:5409'
|
||||
|
||||
#endregion Variables
|
||||
|
||||
#region Executables
|
||||
|
||||
# Executables
|
||||
[string]$MediaEngineService = 'MediaEngineService.exe'
|
||||
[string]$mstsc = 'mstsc.exe'
|
||||
[string]$LyncStore = 'lyncmx.exe'
|
||||
[string]$Lync = 'lync.exe'
|
||||
[string]$Communicator = 'communicator.exe'
|
||||
[string]$AttendantConsole = 'AttendantConsole.exe'
|
||||
|
||||
#endregion Executables
|
||||
|
||||
#region GroupPolicyInfo
|
||||
|
||||
# GPO (Policy) Name
|
||||
[string]$PolicyName = 'S4B QoS - Client'
|
||||
|
||||
# GPO (Policy) Comment
|
||||
[string]$PolicyComment = 'DSCP markings for Lync/Skype for Business client traffic. This GPO should be applied to all Organizational Units (OUs) containing client machines that will use Lync/Skype for Business.'
|
||||
|
||||
#endregion GroupPolicyInfo
|
||||
|
||||
#region Defaults
|
||||
|
||||
# Define some Defaults
|
||||
[string]$SC = 'SilentlyContinue'
|
||||
[string]$STP = 'Stop'
|
||||
[string]$MinusOne = '-1'
|
||||
[string]$OneZero = '1.0'
|
||||
[string]$One = '1'
|
||||
[string]$WC = '*'
|
||||
[string]$ThrotRate = 'Throttle Rate'
|
||||
[string]$DscpVal = 'DSCP Value'
|
||||
[string]$RemIPLen = 'Remote IP Prefix Length'
|
||||
[string]$RemIP = 'Remote IP'
|
||||
[string]$RemPort = 'Remote Port'
|
||||
[string]$LocIPLen = 'Local IP Prefix Length'
|
||||
[string]$LocIP = 'Local IP'
|
||||
[string]$LocPort = 'Local Port'
|
||||
[string]$Protocol = 'Protocol'
|
||||
[string]$AppName = 'Application Name'
|
||||
[string]$Version = 'Version'
|
||||
[string]$STRG = 'String'
|
||||
[string]$UserSettingsDisabled = 'UserSettingsDisabled'
|
||||
[string]$ServicesTcpipQoSName = 'HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\QoS'
|
||||
[string]$ServicesTcpipQoSValue = 'Do not use NLA'
|
||||
[string]$Action = 'Update'
|
||||
[string]$Context = 'Computer'
|
||||
|
||||
#endregion Defaults
|
||||
|
||||
#region ModuleHandler
|
||||
|
||||
try
|
||||
{
|
||||
# List of Modules
|
||||
$Modules = 'ActiveDirectory', 'GroupPolicy'
|
||||
|
||||
# Loop over the Module List
|
||||
foreach ($Module in $Modules)
|
||||
{
|
||||
# Import the Module
|
||||
Write-Verbose -Message ('Importing {0}' -f $Module)
|
||||
|
||||
$null = (Import-Module -Name $Module -ErrorAction $STP -WarningAction $SC)
|
||||
|
||||
Write-Verbose -Message ('Imported {0}' -f $Module)
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
# Whoops
|
||||
Write-Error -Message ('Unable to import the {0} Module, please check your Setup!' -f $Module) -ErrorAction $STP
|
||||
|
||||
# We are done here...
|
||||
break
|
||||
}
|
||||
|
||||
#endregion ModuleHandler
|
||||
}
|
||||
|
||||
PROCESS
|
||||
{
|
||||
#region CreateGroupPolicy
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to create {0}' -f $PolicyName)
|
||||
|
||||
#Cleanup
|
||||
$paramNewGPO = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramNewGPO = @{
|
||||
Name = $PolicyName
|
||||
Comment = $PolicyComment
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
}
|
||||
|
||||
$null = (New-GPO @paramNewGPO)
|
||||
|
||||
Write-Verbose -Message ('Created {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Verbose -Message ('The Policy {0} exists' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion CreateGroupPolicy
|
||||
|
||||
#region ModifyGroupPolicy
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to modify {0}' -f $PolicyName)
|
||||
|
||||
$null = ((Get-GPO -Name $PolicyName).GpoStatus = $UserSettingsDisabled)
|
||||
|
||||
Write-Verbose -Message ('Modified {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Error -Message ('Unable to modify {0}' -f $PolicyName) -ErrorAction $STP
|
||||
|
||||
# We are done here...
|
||||
break
|
||||
}
|
||||
|
||||
#endregion ModifyGroupPolicy
|
||||
|
||||
#region ServicesTcpipQoSName
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPPrefRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPPrefRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Context = $Context
|
||||
Key = $ServicesTcpipQoSName
|
||||
ValueName = $ServicesTcpipQoSValue
|
||||
Value = $One
|
||||
Type = $STRG
|
||||
Action = $Action
|
||||
}
|
||||
|
||||
$null = (Set-GPPrefRegistryValue @paramSetGPPrefRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServicesTcpipQoSName
|
||||
|
||||
#region communicator_exe
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set OCS 2007 R2 Media - communicator.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\OCS 2007 R2 Media - communicator.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Communicator, $WC, $LegacyMediaPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set OCS 2007 R2 Media - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set OCS 2007 R2 Media - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2010 Audio QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2010 Audio QoS - communicator.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Communicator, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2010 Audio QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2010 Audio QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2010 Video QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2010 Video QoS - communicator.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Communicator, $WC, $VideoPorts, $WC, $WC, $WC, $WC, $WC, $VideoMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2010 Video QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2010 Video QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2010 Application Sharing QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2010 Application Sharing QoS - communicator.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Communicator, $WC, $AppSharePorts, $WC, $WC, $WC, $WC, $WC, $AppShareMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2010 Application Sharing QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to Set Lync 2010 Application Sharing QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2010 File Transfer QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2010 File Transfer QoS - communicator.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Communicator, $WC, $FileTransferPorts, $WC, $WC, $WC, $WC, $WC, $FileTransferMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2010 File Transfer QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2010 File Transfer QoS - communicator.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion communicator_exe
|
||||
|
||||
#region attendantconsole_exe
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2010 Attendant Audio QoS - attendantconsole.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2010 Attendant Audio QoS - attendantconsole.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $AttendantConsole, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2010 Attendant Audio QoS - attendantconsole.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2010 Attendant Audio QoS - attendantconsole.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion attendantconsole_exe
|
||||
|
||||
#region lync_exe
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2013 Audio QoS - lync.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2013 Audio QoS - lync.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Lync, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2013 Audio QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2013 Audio QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2013 Video QoS - lync.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2013 Video QoS - lync.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Lync, $WC, $VideoPorts, $WC, $WC, $WC, $WC, $WC, $VideoMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2013 Video QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2013 Video QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2013 Application Sharing QoS - lync.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2013 Application Sharing QoS - lync.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Lync, $WC, $AppSharePorts, $WC, $WC, $WC, $WC, $WC, $AppShareMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2013 Application Sharing QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2013 Application Sharing QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2013 File Transfer QoS - lync.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2013 File Transfer QoS - lync.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Lync, $WC, $FileTransferPorts, $WC, $WC, $WC, $WC, $WC, $FileTransferMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2013 File Transfer QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2013 File Transfer QoS - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync 2013 SIP - lync.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync 2013 SIP - lync.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $Lync, $WC, $LyncSipPorts, $WC, $WC, $WC, $WC, $WC, $AppShareMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync 2013 SIP - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync 2013 SIP - lync.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion lync_exe
|
||||
|
||||
#region lyncmx_exe
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync Windows Store App Audio QoS - lyncmx.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync Windows Store App Audio QoS - lyncmx.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $LyncStore, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync Windows Store App Audio QoS - lyncmx.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync Windows Store App Audio QoS - lyncmx.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Lync Windows Store App Video QoS - lyncmx.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Lync Windows Store App Video QoS - lyncmx.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $LyncStore, $WC, $VideoPorts, $WC, $WC, $WC, $WC, $WC, $VideoMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Lync Windows Store App Video QoS - lyncmx.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Lync Windows Store App Video QoS - lyncmx.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion lyncmx_exe
|
||||
|
||||
#region VdiSetup
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set VDI Audio QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\VDI Audio QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $mstsc, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set VDI Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set VDI Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set VDI Video QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\VDI Video QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $mstsc, $WC, $VideoPorts, $WC, $WC, $WC, $WC, $WC, $VideoMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set VDI Video QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set VDI Video QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set VDI Application Sharing QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\VDI Application Sharing QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $mstsc, $WC, $AppSharePorts, $WC, $WC, $WC, $WC, $WC, $AppShareMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set VDI Application Sharing QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set VDI Application Sharing QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion VdiSetup
|
||||
|
||||
#region VdiHdxSetup
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set VDI Audio QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\VDI Audio QoS (Citrix HDX RealTime Optimization Pack 2.0)'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $MediaEngineService, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set VDI Audio QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set VDI Audio QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set VDI Video QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\VDI Video QoS (Citrix HDX RealTime Optimization Pack 2.0)'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $MediaEngineService, $WC, $VideoPorts, $WC, $WC, $WC, $WC, $WC, $VideoMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set VDI Video QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set VDI Video QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set VDI Application Sharing QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\VDI Application Sharing QoS (Citrix HDX RealTime Optimization Pack 2.0)'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $MediaEngineService, $WC, $AppSharePorts, $WC, $WC, $WC, $WC, $WC, $AppShareMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set VDI Application Sharing QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set VDI Application Sharing QoS (Citrix HDX RealTime Optimization Pack 2.0) in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion VdiHdxSetup
|
||||
}
|
||||
|
||||
END
|
||||
{
|
||||
Write-Output -InputObject ('Done with the creation of {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#region License
|
||||
|
||||
<#
|
||||
Copyright (c) 2017, Joerg Hochwald. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
By using the Software, you agree to the License, Terms and Conditions above!
|
||||
#>
|
||||
|
||||
<#
|
||||
This is a third-party Software!
|
||||
|
||||
The developer of this Software is NOT sponsored by or affiliated with Microsoft Corp (MSFT) or any of its subsidiaries in any way
|
||||
The Software is not supported by Microsoft Corp (MSFT)!
|
||||
#>
|
||||
|
||||
#endregion License
|
||||
1502
Powershell/PowerShell-collection/Skype_for_Business/QoS/Edge_REG.ps1
Normal file
1502
Powershell/PowerShell-collection/Skype_for_Business/QoS/Edge_REG.ps1
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,357 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Create the S4B Related Exchange UM QoS Group Policy
|
||||
|
||||
.DESCRIPTION
|
||||
Create the Skype for Busines related Exchange Unified Messaging Quality of Services Group Policy
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\ExchangeUM_GPO.ps1
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\ExchangeUM_GPO.ps1 -verbose
|
||||
|
||||
.NOTES
|
||||
Check that the ports and port ranges fit your requirements!
|
||||
|
||||
The ports and ranges we use here should fit the Skype for Business Online setup
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param ()
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
BEGIN
|
||||
{
|
||||
#region Variables
|
||||
|
||||
# QoS marking for Audio
|
||||
$SC = 'SilentlyContinue'
|
||||
$STP = 'Stop'
|
||||
[string]$AudioMark = '46'
|
||||
|
||||
#endregion Variables
|
||||
|
||||
#region GroupPolicyInfo
|
||||
|
||||
# GPO (Policy) Name
|
||||
[string]$PolicyName = 'S4B QoS - Exchange UM'
|
||||
|
||||
# GPO (Policy) Comment
|
||||
[string]$PolicyComment = 'DSCP markings for Exchange UM traffic. This GPO should be applied to all Organizational Units (OUs) containing Exchange UM servers.'
|
||||
|
||||
#endregion GroupPolicyInfo
|
||||
|
||||
#region Defaults
|
||||
|
||||
# Define some Defaults
|
||||
[string]$MinusOne = '-1'
|
||||
[string]$OneZero = '1.0'
|
||||
[string]$One = '1'
|
||||
[string]$WC = '*'
|
||||
[string]$ThrotRate = 'Throttle Rate'
|
||||
[string]$DscpVal = 'DSCP Value'
|
||||
[string]$RemIPLen = 'Remote IP Prefix Length'
|
||||
[string]$RemIP = 'Remote IP'
|
||||
[string]$RemPort = 'Remote Port'
|
||||
[string]$LocIPLen = 'Local IP Prefix Length'
|
||||
[string]$LocIP = 'Local IP'
|
||||
[string]$LocPort = 'Local Port'
|
||||
[string]$Protocol = 'Protocol'
|
||||
[string]$AppName = 'Application Name'
|
||||
[string]$Version = 'Version'
|
||||
[string]$STRG = 'String'
|
||||
[string]$UserSettingsDisabled = 'UserSettingsDisabled'
|
||||
[string]$ServicesTcpipQoSName = 'HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\QoS'
|
||||
[string]$ServicesTcpipQoSValue = 'Do not use NLA'
|
||||
[string]$Action = 'Update'
|
||||
[string]$Context = 'Computer'
|
||||
|
||||
#endregion Defaults
|
||||
|
||||
#region ModuleHandler
|
||||
|
||||
try
|
||||
{
|
||||
# List of Modules
|
||||
$Modules = 'ActiveDirectory', 'GroupPolicy'
|
||||
|
||||
# Loop over the Module List
|
||||
foreach ($Module in $Modules)
|
||||
{
|
||||
# Import the Module
|
||||
Write-Verbose -Message ('Importing {0}' -f $Module)
|
||||
|
||||
$null = (Import-Module -Name $Module -ErrorAction $STP -WarningAction $SC)
|
||||
|
||||
Write-Verbose -Message ('Imported {0}' -f $Module)
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
# Whoops
|
||||
Write-Error -Message ('Unable to import the {0} Module, please check your Setup!' -f $Module) -ErrorAction $STP
|
||||
|
||||
# We are done here...
|
||||
break
|
||||
}
|
||||
|
||||
#endregion ModuleHandler
|
||||
}
|
||||
|
||||
PROCESS
|
||||
{
|
||||
#region CreateGroupPolicy
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to create {0}' -f $PolicyName)
|
||||
|
||||
#Cleanup
|
||||
$paramNewGPO = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramNewGPO = @{
|
||||
Name = $PolicyName
|
||||
Comment = $PolicyComment
|
||||
ErrorAction = Stop
|
||||
WarningAction = SilentlyContinue
|
||||
Confirm = $false
|
||||
}
|
||||
|
||||
$null = (New-GPO @paramNewGPO)
|
||||
|
||||
Write-Verbose -Message ('Created {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Verbose -Message ('The Policy {0} exists' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion CreateGroupPolicy
|
||||
|
||||
#region ModifyGroupPolicy
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to modify {0}' -f $PolicyName)
|
||||
|
||||
$null = ((Get-GPO -Name $PolicyName).GpoStatus = $UserSettingsDisabled)
|
||||
|
||||
Write-Verbose -Message ('Modified {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Error -Message ('Unable to modify {0}' -f $PolicyName) -ErrorAction $STP
|
||||
|
||||
# We are done here...
|
||||
break
|
||||
}
|
||||
|
||||
#endregion ModifyGroupPolicy
|
||||
|
||||
#region ServicesTcpipQoSName
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPPrefRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPPrefRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = Stop
|
||||
WarningAction = SilentlyContinue
|
||||
Context = $Context
|
||||
Key = $ServicesTcpipQoSName
|
||||
ValueName = $ServicesTcpipQoSValue
|
||||
Value = $One
|
||||
Type = $STRG
|
||||
Action = $Action
|
||||
}
|
||||
|
||||
$null = (Set-GPPrefRegistryValue @paramSetGPPrefRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServicesTcpipQoSName
|
||||
|
||||
#region EdgeToExchangeAudio
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Edge to Exchange UM Audio QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Edge to Exchange UM Audio QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $WC, $WC, '1024:65535', $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Edge to Exchange UM Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Edge to Exchange UM Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion EdgeToExchangeAudio
|
||||
|
||||
#region umservices_exe
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Exchange UM Audio to Edge QoS - umservices.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Exchange UM Audio to Edge QoS - umservices.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, 'umservices.exe', $WC, '', $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Exchange UM Audio to Edge QoS - umservices.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Exchange UM Audio to Edge QoS - umservices.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion umservices_exe
|
||||
|
||||
#region Microsoft_Exchange_UM_CallRouter_exe
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Exchange UM Audio to Edge QoS - Microsoft.Exchange.UM.CallRouter.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Exchange UM Audio to Edge QoS - Microsoft.Exchange.UM.CallRouter.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, 'Microsoft.Exchange.UM.CallRouter.exe', $WC, '', $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Exchange UM Audio to Edge QoS - Microsoft.Exchange.UM.CallRouter.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Exchange UM Audio to Edge QoS - Microsoft.Exchange.UM.CallRouter.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion Microsoft_Exchange_UM_CallRouter_exe
|
||||
|
||||
#region umworkerprocess_exe
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Exchange UM Audio to Edge QoS - umworkerprocess.exe in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Exchange UM Audio to Edge QoS - umworkerprocess.exe'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, 'umworkerprocess.exe', $WC, '', $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Exchange UM Audio to Edge QoS - umworkerprocess.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Exchange UM Audio to Edge QoS - umworkerprocess.exe in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion umworkerprocess_exe
|
||||
}
|
||||
|
||||
END
|
||||
{
|
||||
Write-Output -InputObject ('Done with the creation of {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#region License
|
||||
|
||||
<#
|
||||
Copyright (c) 2017, Joerg Hochwald. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
By using the Software, you agree to the License, Terms and Conditions above!
|
||||
#>
|
||||
|
||||
<#
|
||||
This is a third-party Software!
|
||||
|
||||
The developer of this Software is NOT sponsored by or affiliated with Microsoft Corp (MSFT) or any of its subsidiaries in any way
|
||||
The Software is not supported by Microsoft Corp (MSFT)!
|
||||
#>
|
||||
|
||||
#endregion License
|
||||
@@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2019, enabling Technology <http://enatec.io>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,500 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Create the S4B Server QoS Group Policy
|
||||
|
||||
.DESCRIPTION
|
||||
Create the Skype for Busines related Quality of Services Server Group Policy
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\Server_GPO.ps1
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\Server_GPO.ps1 -verbose
|
||||
|
||||
.NOTES
|
||||
Check that the ports and port ranges fit your requirements!
|
||||
|
||||
The ports and ranges we use here should fit the Skype for Business Online setup
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param ()
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
BEGIN
|
||||
{
|
||||
#region Variables
|
||||
|
||||
# Ports to use for Application Sharing
|
||||
[string]$AppSharePorts = '50040:50059'
|
||||
|
||||
# QoS marking for Application Sharing
|
||||
[string]$AppShareMark = '24'
|
||||
|
||||
# Ports to use for Video
|
||||
[string]$VideoPorts = '50020:50039'
|
||||
|
||||
# QoS marking for Video
|
||||
[string]$VideoMark = '34'
|
||||
|
||||
# Ports to use for Audio
|
||||
[string]$AudioPorts = '50000:50019'
|
||||
|
||||
# QoS marking for Audio
|
||||
[string]$AudioMark = '46'
|
||||
|
||||
#endregion Variables
|
||||
|
||||
#region GroupPolicyInfo
|
||||
|
||||
# GPO (Policy) Name
|
||||
[string]$PolicyName = 'S4B QoS - Server'
|
||||
|
||||
# GPO (Policy) Comment
|
||||
[string]$PolicyComment = 'DSCP markings for Lync/Skype for Business front end server traffic. This GPO should be applied to all Organizational Units (OUs) containing Lync/Skype for Business front-end servers.'
|
||||
|
||||
#endregion GroupPolicyInfo
|
||||
|
||||
#region Executables
|
||||
|
||||
# Executables
|
||||
[string]$OcsAppServerHost = 'OcsAppServerHost.exe'
|
||||
[string]$avmcusvc = 'avmcusvc.exe'
|
||||
[string]$asmcusvc = 'asmcusvc.exe'
|
||||
|
||||
#endregion Executables
|
||||
|
||||
#region Defaults
|
||||
|
||||
# Define some Defaults
|
||||
[string]$SC = 'SilentlyContinue'
|
||||
[string]$STP = 'Stop'
|
||||
[string]$MinusOne = '-1'
|
||||
[string]$OneZero = '1.0'
|
||||
[string]$One = '1'
|
||||
[string]$WC = '*'
|
||||
[string]$ThrotRate = 'Throttle Rate'
|
||||
[string]$DscpVal = 'DSCP Value'
|
||||
[string]$RemIPLen = 'Remote IP Prefix Length'
|
||||
[string]$RemIP = 'Remote IP'
|
||||
[string]$RemPort = 'Remote Port'
|
||||
[string]$LocIPLen = 'Local IP Prefix Length'
|
||||
[string]$LocIP = 'Local IP'
|
||||
[string]$LocPort = 'Local Port'
|
||||
[string]$Protocol = 'Protocol'
|
||||
[string]$AppName = 'Application Name'
|
||||
[string]$Version = 'Version'
|
||||
[string]$STRG = 'String'
|
||||
[string]$UserSettingsDisabled = 'UserSettingsDisabled'
|
||||
[string]$ServicesTcpipQoSName = 'HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\QoS'
|
||||
[string]$ServicesTcpipQoSValue = 'Do not use NLA'
|
||||
[string]$Action = 'Update'
|
||||
[string]$Context = 'Computer'
|
||||
|
||||
#endregion Defaults
|
||||
|
||||
#region ModuleHandler
|
||||
|
||||
try
|
||||
{
|
||||
# List of Modules
|
||||
$Modules = 'ActiveDirectory', 'GroupPolicy'
|
||||
|
||||
# Loop over the Module List
|
||||
foreach ($Module in $Modules)
|
||||
{
|
||||
# Import the Module
|
||||
Write-Verbose -Message ('Importing {0}' -f $Module)
|
||||
|
||||
$null = (Import-Module -Name $Module -ErrorAction $STP -WarningAction $SC)
|
||||
|
||||
Write-Verbose -Message ('Imported {0}' -f $Module)
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
# Whoops
|
||||
Write-Error -Message ('Unable to import the {0} Module, please check your Setup!' -f $Module) -ErrorAction $STP
|
||||
|
||||
# We are done here...
|
||||
break
|
||||
}
|
||||
|
||||
#endregion ModuleHandler
|
||||
}
|
||||
|
||||
PROCESS
|
||||
{
|
||||
#region CreateGroupPolicy
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to create {0}' -f $PolicyName)
|
||||
|
||||
#Cleanup
|
||||
$paramNewGPO = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramNewGPO = @{
|
||||
Name = $PolicyName
|
||||
Comment = $PolicyComment
|
||||
ErrorAction = Stop
|
||||
WarningAction = SilentlyContinue
|
||||
Confirm = $false
|
||||
}
|
||||
|
||||
$null = (New-GPO @paramNewGPO)
|
||||
|
||||
Write-Verbose -Message ('Created {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Verbose -Message ('The Policy {0} exists' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion CreateGroupPolicy
|
||||
|
||||
#region ModifyGroupPolicy
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to modify {0}' -f $PolicyName)
|
||||
|
||||
$null = ((Get-GPO -Name $PolicyName).GpoStatus = $UserSettingsDisabled)
|
||||
|
||||
Write-Verbose -Message ('Modified {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Error -Message ('Unable to modify {0}' -f $PolicyName) -ErrorAction $STP
|
||||
|
||||
# We are done here...
|
||||
break
|
||||
}
|
||||
|
||||
#endregion ModifyGroupPolicy
|
||||
|
||||
#region ServicesTcpipQoSName
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPPrefRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPPrefRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = Stop
|
||||
WarningAction = SilentlyContinue
|
||||
Context = $Context
|
||||
Key = $ServicesTcpipQoSName
|
||||
ValueName = $ServicesTcpipQoSValue
|
||||
Value = $One
|
||||
Type = $STRG
|
||||
Action = $Action
|
||||
}
|
||||
|
||||
$null = (Set-GPPrefRegistryValue @paramSetGPPrefRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to Set {0} to {1} {2} in {3}' -f $ServicesTcpipQoSName, $ServicesTcpipQoSValue, $One, $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServicesTcpipQoSName
|
||||
|
||||
#region ServerConferencing
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server Conferencing Audio QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server Conferencing Audio QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $avmcusvc, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server Conferencing Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server Conferencing Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server Conferencing Video QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server Conferencing Video QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $avmcusvc, $WC, $VideoPorts, $WC, $WC, $WC, $WC, $WC, $VideoMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server Conferencing Video QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server Conferencing Video QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServerConferencing
|
||||
|
||||
#region ServerApplicationSharing
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server Application Sharing QoS in {0}' -f $PolicyName)
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server Application Sharing QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $asmcusvc, $WC, $AppSharePorts, $WC, $WC, $WC, $WC, $WC, $AppShareMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server Application Sharing QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server Application Sharing QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServerApplicationSharing
|
||||
|
||||
#region ServerResponseGroup
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server Response Group QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server Response Group QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $OcsAppServerHost, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server Response Group QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server Response Group QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServerResponseGroup
|
||||
|
||||
#region ServerConferenceAnnouncement
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server Conference Announcement Service QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server Conference Announcement Service QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $OcsAppServerHost, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server Conference Announcement Service QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server Conference Announcement Service QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServerConferenceAnnouncement
|
||||
|
||||
#region ServerCallPark
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server Call Park QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server Call Park QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $OcsAppServerHost, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server Call Park QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server Call Park QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServerCallPark
|
||||
|
||||
#region ServerUCMAApplications
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server UCMA Applications Audio QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server UCMA Applications Audio QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $OcsAppServerHost, $WC, $AudioPorts, $WC, $WC, $WC, $WC, $WC, $AudioMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server UCMA Applications Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server UCMA Applications Audio QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Try to set Server UCMA Applications Video QoS in {0}' -f $PolicyName)
|
||||
|
||||
# Cleanup
|
||||
$paramSetGPRegistryValue = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetGPRegistryValue = @{
|
||||
Name = $PolicyName
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
Confirm = $false
|
||||
Key = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\QoS\Server UCMA Applications Video QoS'
|
||||
ValueName = $Version, $AppName, $Protocol, $LocPort, $LocIP, $LocIPLen, $RemPort, $RemIP, $RemIPLen, $DscpVal, $ThrotRate
|
||||
Type = $STRG
|
||||
Value = $OneZero, $OcsAppServerHost, $WC, $VideoPorts, $WC, $WC, $WC, $WC, $WC, $VideoMark, $MinusOne
|
||||
}
|
||||
|
||||
$null = (Set-GPRegistryValue @paramSetGPRegistryValue)
|
||||
|
||||
Write-Verbose -Message ('Set Server UCMA Applications Video QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message ('Unable to set Server UCMA Applications Video QoS in {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#endregion ServerUCMAApplications
|
||||
}
|
||||
|
||||
END
|
||||
{
|
||||
Write-Output -InputObject ('Done with the creation of {0}' -f $PolicyName)
|
||||
}
|
||||
|
||||
#region License
|
||||
|
||||
<#
|
||||
Copyright (c) 2017, Joerg Hochwald. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
By using the Software, you agree to the License, Terms and Conditions above!
|
||||
#>
|
||||
|
||||
<#
|
||||
This is a third-party Software!
|
||||
|
||||
The developer of this Software is NOT sponsored by or affiliated with Microsoft Corp (MSFT) or any of its subsidiaries in any way
|
||||
The Software is not supported by Microsoft Corp (MSFT)!
|
||||
#>
|
||||
|
||||
#endregion License
|
||||
@@ -0,0 +1,443 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Setup the S4B server for QoS
|
||||
|
||||
.DESCRIPTION
|
||||
Setup the Skype for Business 2015 Server for Quality of Services
|
||||
|
||||
.PARAMETER FrontEndPool
|
||||
Skype for Business Front End Pool
|
||||
|
||||
.PARAMETER EdgePool
|
||||
Skype for Business Edge Pool
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\Skype_Server_Config.ps1
|
||||
|
||||
.EXAMPLE
|
||||
PS C:\> .\Skype_Server_Config.ps1 -verbose
|
||||
|
||||
.NOTES
|
||||
Check that the ports and port ranges fit your requirements!
|
||||
|
||||
The ports and ranges we use here should fit the Skype for Business Online setup
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param
|
||||
(
|
||||
[Parameter(ValueFromPipeline,
|
||||
Position = 1)]
|
||||
[string]
|
||||
$FrontEndPool = 's4bfe.fra.hicts.net',
|
||||
[Parameter(ValueFromPipeline,
|
||||
Position = 2)]
|
||||
[string]
|
||||
$EdgePool = 's4bedge.dmz.hicts.net'
|
||||
)
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
BEGIN
|
||||
{
|
||||
#region Variables
|
||||
|
||||
# QoS marking for Audio
|
||||
[string]$AudioMark = '46'
|
||||
|
||||
# Audio Start Port
|
||||
[string]$AudioPortStart = '50000'
|
||||
|
||||
# Number of Ports to use
|
||||
[string]$AudioPortCount = '20'
|
||||
|
||||
# Video Start Port
|
||||
[string]$VideoPortStart = ([int]$AudioPortStart + [int]$AudioPortCount)
|
||||
# Legacy variante of the above (without calculating)
|
||||
#[string]$VideoPortStart = '50020'
|
||||
|
||||
# Number of Ports to use
|
||||
[string]$VideoPortCount = '20'
|
||||
|
||||
# App Sharing Start Port
|
||||
[string]$AppSharingPortStart = ([int]$VideoPortStart + [int]$VideoPortCount)
|
||||
# Legacy variante of the above (without calculating)
|
||||
#[string]$AppSharingPortStart = '50040'
|
||||
|
||||
# Number of Ports to use
|
||||
[string]$AppSharingPortCount = '20'
|
||||
|
||||
# Start File Transfer Port
|
||||
[string]$ClientFileTransferPort = '5350'
|
||||
|
||||
# Number of Ports to use
|
||||
[string]$ClientFileTransferPortRange = '20'
|
||||
|
||||
# Start Legacy Media Port
|
||||
[string]$ClientMediaPort = '5370'
|
||||
|
||||
# Number of Ports to use (Legacy)
|
||||
[string]$ClientMediaPortRange = '20'
|
||||
|
||||
# Number of Ports to use (Legacy)
|
||||
[string]$MediaCommunicationPortCount = '10000'
|
||||
|
||||
<#
|
||||
|
||||
# Legacy variables
|
||||
|
||||
# Skype for Business Front End Pool
|
||||
[string]$FrontEndPool = 's4bfe.fra.hicts.net'
|
||||
|
||||
# Skype for Business Edge Pool
|
||||
[string]$EdgePool = 's4bedge.dmz.hicts.net'
|
||||
#>
|
||||
|
||||
#endregion Variables
|
||||
|
||||
#region Defaults
|
||||
|
||||
# Define some Defaults
|
||||
[string]$SC = 'SilentlyContinue'
|
||||
[string]$STP = 'Stop'
|
||||
[string]$Global = 'global'
|
||||
[string]$Voice8021p = '0'
|
||||
|
||||
#endregion Defaults
|
||||
|
||||
#region CheckCmd
|
||||
|
||||
# All Skype for Business Server related commands
|
||||
$AllCommands = 'Set-CsConferencingConfiguration', 'Set-CsUCPhoneConfiguration', 'Set-CsMediaConfiguration', 'Set-CsConferenceServer', 'Set-CsApplicationServer', 'Set-CsMediationServer', 'Set-CsWebServer', 'Set-CsEdgeServer'
|
||||
|
||||
# Loop over the list of commands
|
||||
foreach ($TheCommand in $AllCommands)
|
||||
{
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message ('Check for {0}' -f $TheCommand)
|
||||
|
||||
# Cleanup
|
||||
$paramGetCommand = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramGetCommand = @{
|
||||
Name = $TheCommand
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
$null = (Get-Command @paramGetCommand)
|
||||
|
||||
Write-Verbose -Message ('Found {0}' -f $TheCommand)
|
||||
}
|
||||
catch
|
||||
{
|
||||
# Whoops
|
||||
$paramWriteError = @{
|
||||
Message = ('Unable to find {0} - Please check your Setup!' -f $TheCommand)
|
||||
ErrorAction = $STP
|
||||
}
|
||||
Write-Error @paramWriteError
|
||||
|
||||
# We are done here...
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
#endregion CheckCmd
|
||||
}
|
||||
|
||||
PROCESS
|
||||
{
|
||||
#region ConferencingConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change Conferencing Configuration'
|
||||
|
||||
# Cleanup
|
||||
$paramSetCsConferencingConfiguration = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsConferencingConfiguration = @{
|
||||
Identity = $Global
|
||||
ClientAudioPort = $AudioPortStart
|
||||
ClientAudioPortRange = $AudioPortCount
|
||||
ClientVideoPort = $VideoPortStart
|
||||
ClientVideoPortRange = $VideoPortCount
|
||||
ClientAppSharingPort = $AppSharingPortStart
|
||||
ClientAppSharingPortRange = $AppSharingPortCount
|
||||
ClientFileTransferPort = $ClientFileTransferPort
|
||||
ClientFileTransferPortRange = $ClientFileTransferPortRange
|
||||
ClientMediaPortRangeEnabled = $true
|
||||
ClientMediaPort = $ClientMediaPort
|
||||
ClientMediaPortRange = $ClientMediaPortRange
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsConferencingConfiguration @paramSetCsConferencingConfiguration)
|
||||
|
||||
Write-Verbose -Message 'Changed Conferencing Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set Conferencing Configuration'
|
||||
}
|
||||
|
||||
#endregion ConferencingConfiguration
|
||||
|
||||
#region ChangeUCPhoneConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change UC Phone Configuration'
|
||||
|
||||
# Cleanup
|
||||
$paramSetCsUCPhoneConfiguration = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsUCPhoneConfiguration = @{
|
||||
Identity = $Global
|
||||
VoiceDiffServTag = $AudioMark
|
||||
Voice8021p = $Voice8021p
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsUCPhoneConfiguration @paramSetCsUCPhoneConfiguration)
|
||||
|
||||
Write-Verbose -Message 'Changed UC Phone Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set UC Phone Configuration'
|
||||
}
|
||||
|
||||
#endregion ChangeUCPhoneConfiguration
|
||||
|
||||
#region ChangeMediaConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change Media Configuration'
|
||||
|
||||
# Cleanup
|
||||
$paramSetCsMediaConfiguration = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsMediaConfiguration = @{
|
||||
Identity = $Global
|
||||
EnableQoS = $true
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsMediaConfiguration @paramSetCsMediaConfiguration)
|
||||
|
||||
Write-Verbose -Message 'Changed Media Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set Media Configuration'
|
||||
}
|
||||
|
||||
#endregion ChangeMediaConfiguration
|
||||
|
||||
#region ChangeConferenceServerConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change Conference Server Configuration'
|
||||
|
||||
# Cleanup
|
||||
$paramSetCsConferenceServer = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsConferenceServer = @{
|
||||
Identity = $FrontEndPool
|
||||
AppSharingPortStart = $AppSharingPortStart
|
||||
AppSharingPortCount = $AppSharingPortCount
|
||||
AudioPortStart = $AudioPortStart
|
||||
AudioPortCount = $AudioPortCount
|
||||
VideoPortStart = $VideoPortStart
|
||||
VideoPortCount = $VideoPortCount
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsConferenceServer @paramSetCsConferenceServer)
|
||||
|
||||
Write-Verbose -Message 'Changed Conference Server Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set Conference Server Configuration'
|
||||
}
|
||||
|
||||
#endregion ChangeConferenceServerConfiguration
|
||||
|
||||
#region ChangeApplicationServerConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change Application Server Configuration'
|
||||
|
||||
# Cleanup
|
||||
$paramSetCsApplicationServer = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsApplicationServer = @{
|
||||
Identity = $FrontEndPool
|
||||
AppSharingPortStart = $AppSharingPortStart
|
||||
AppSharingPortCount = $AppSharingPortCount
|
||||
AudioPortStart = $AudioPortStart
|
||||
AudioPortCount = $AudioPortCount
|
||||
VideoPortStart = $VideoPortStart
|
||||
VideoPortCount = $VideoPortCount
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsApplicationServer @paramSetCsApplicationServer)
|
||||
|
||||
Write-Verbose -Message 'Changed Application Server Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set Application Server Configuration'
|
||||
}
|
||||
|
||||
#endregion ChangeApplicationServerConfiguration
|
||||
|
||||
#region ChangeMediationServerConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change Mediation Server Configuration'
|
||||
|
||||
#Cleanup
|
||||
$paramSetCsMediationServer = $null
|
||||
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsMediationServer = @{
|
||||
Identity = $FrontEndPool
|
||||
AudioPortStart = $AudioPortStart
|
||||
AudioPortCount = $AudioPortCount
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsMediationServer @paramSetCsMediationServer)
|
||||
|
||||
Write-Verbose -Message 'Changed Mediation Server Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set Mediation Server Configuration'
|
||||
}
|
||||
|
||||
#endregion ChangeMediationServerConfiguration
|
||||
|
||||
#region ChangeWebServerConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change Web Server Configuration'
|
||||
|
||||
#Cleanup
|
||||
$paramSetCsWebServer = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsWebServer = @{
|
||||
Identity = $FrontEndPool
|
||||
AppSharingPortStart = $AppSharingPortStart
|
||||
AppSharingPortCount = $AppSharingPortCount
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsWebServer @paramSetCsWebServer)
|
||||
|
||||
Write-Verbose -Message 'Changed Web Server Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set Web Server Configuration'
|
||||
}
|
||||
|
||||
#endregion ChangeWebServerConfiguration
|
||||
|
||||
#region ChangeEdgeServerConfiguration
|
||||
|
||||
try
|
||||
{
|
||||
Write-Verbose -Message 'Change Edge Server Configuration'
|
||||
|
||||
# Cleanup
|
||||
$paramSetCsEdgeServer = $null
|
||||
|
||||
# Splat reusable parameters
|
||||
$paramSetCsEdgeServer = @{
|
||||
Identity = $EdgePool
|
||||
MediaCommunicationPortStart = $AudioPortStart
|
||||
MediaCommunicationPortCount = $MediaCommunicationPortCount
|
||||
ErrorAction = $STP
|
||||
WarningAction = $SC
|
||||
}
|
||||
|
||||
$null = (Set-CsEdgeServer @paramSetCsEdgeServer)
|
||||
|
||||
Write-Verbose -Message 'Changed Edge Server Configuration'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Warning -Message 'Unable to Set Edge Server Configuration'
|
||||
}
|
||||
|
||||
#endregion ChangeEdgeServerConfiguration
|
||||
}
|
||||
|
||||
END
|
||||
{
|
||||
Write-Output -InputObject 'Done with the Skype for Business QoS setup.'
|
||||
}
|
||||
|
||||
#region License
|
||||
|
||||
<#
|
||||
Copyright (c) 2017, Joerg Hochwald. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
By using the Software, you agree to the License, Terms and Conditions above!
|
||||
#>
|
||||
|
||||
<#
|
||||
This is a third-party Software!
|
||||
|
||||
The developer of this Software is NOT sponsored by or affiliated with Microsoft Corp (MSFT) or any of its subsidiaries in any way
|
||||
The Software is not supported by Microsoft Corp (MSFT)!
|
||||
#>
|
||||
|
||||
#endregion License
|
||||
@@ -0,0 +1,8 @@
|
||||
# Legacy Notice
|
||||
|
||||
I no longer run Exchange, Skype for Business, or any other Office Server on Premises.
|
||||
This is my personal [reaction](https://hochwald.net/microsoft-rolls-back-decision-to-take-away-internal-usage-rights-from-partners/) to the changes that Microsoft [announced](https://hochwald.net/microsoft-is-going-to-kill-internal-use-rights-benefit-for-partners/) for the Internal Use Rights (IUR) program. I know that they decided to reverse that changes and in theory, I could still legally use the software. However, I decided to decommission everything licensed under the terms of the Internal Use Rights (IUR) program.
|
||||
In my opinion, the community always should have some benefits from the Internal Use Rights (IUR) program and/or Action Pack. Now that I decided to drop out, there will be no more such benefits.
|
||||
|
||||
I will _no longer maintain_ the scripts related to the Microsoft Office (on Premises) servers. They will remain here, but unmaintained. Fork the repository and maintain or extend them if you like to. The [License](https://github.com/jhochwald/PowerShell-collection/blob/master/LICENSE) allows that easily.
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Skype for Business QoS Settings
|
||||
Setup Quality of Services (QoS) on Skype for Business Servers and Clients.
|
||||
|
||||
## You Network
|
||||
You must configure your network equipment to match the marks that are configured on the client/server part.
|
||||
|
||||
Some people get this QoS wrong: This configuration enables your Clients and Servers to mark the traffic! Not more, not less. Your network equipment must do the dirty work and prioritize and/or reserve bandwidth that match your requirements.
|
||||
|
||||
If you just load the stuff here, nothing will change. Your Skype Clients and servers will mark the packets and that's about it!
|
||||
|
||||
## What it does
|
||||
It configures the Skype for Business Servers to use a small range of ports for each function (e.g. Voice or Video). This range should match the Skype for Business Online (SfBO) configuration.
|
||||
All Skype for Business Clients should use these configuration after a restart/re-login. Even non-Windows clients will be using the configuration, because it is configured on the server.
|
||||
|
||||
For Skype for Business Servers and Windows Based Clients, a dedicated Group Policy will be established. You should apply these to all OU's where the Clients and/or Servers are located.
|
||||
The Client Policy also contains configuration/settings for VDI instances, and even for Citrix HDX setup's.
|
||||
|
||||
There is also the matching Edge configuration, these boxes should never be domain joined. Therefore, we use local registry settings!
|
||||
|
||||
To make the end-to-end setup, there is also a dedicated Group Policy for Exchange Servers. This Policy should be applied at minimum to all Exchange Servers that hosts the Unified Messaging Role. I apply these to all Exchange Servers.
|
||||
|
||||
## Please review everything
|
||||
Before using the scripts to configure and/or load anything, you should review them! Do not just execute them. These scripts will change a lot and it will reconfigure a lot on your Skype for Business servers!!!
|
||||
Don't blame me if something doesn't work as you might expect it.
|
||||
|
||||
## Detailed configuration
|
||||
The source is the documentation! I know, that sounds typical for a geek... But if you take a closer look at the scripts, you will see a lot of comments and documentation snippets. They should make the settings and a lot of the logic clear.
|
||||
|
||||
Microsoft (MSFT) and the community provide a lot of very good and detailed documentation about Skype and QoS.
|
||||
|
||||
## Content
|
||||
Here is a quick overview of the content
|
||||
|
||||
### `Client_GPO.ps1`
|
||||
Create the Skype for Busines related Quality of Services Client Group Policy
|
||||
|
||||
### `Edge_REG.ps1`
|
||||
Setup the Skype for Business 2015 Edge Server for Quality of Services
|
||||
Edge Servers are not domain joined, we have to modify the registry instead of using a Group Policy
|
||||
|
||||
### `ExchangeUM_GPO.ps1`
|
||||
Create the Skype for Busines related Exchange Unified Messaging Quality of Services Group Policy
|
||||
|
||||
### `Server_GPO.ps1`
|
||||
Create the Skype for Busines related Quality of Services Server Group Policy
|
||||
|
||||
### `Skype_Server_Config.ps1`
|
||||
Setup the Skype for Business 2015 Server for Quality of Services
|
||||
|
||||
## Signed
|
||||
There is a signed version of the scripts within the 'signed' directory. The scripts are the same, they are signed with a valid certificate.
|
||||
|
||||
## Support
|
||||
Are you kidding me? This is free software. Take it, or leave it!
|
||||
|
||||
## Final remarks
|
||||
You Network Equipment must support QoS End-to-End!
|
||||
|
||||
Teams is not supported (yet).
|
||||
|
||||
Some of the new ports for Skype for Business Online (SfBO) are still missing. I might provide an updated version for them soon.
|
||||
|
||||
Hybrid with Skype for Business Online (SfBO) will work! But if you want to use QoS End-To-End, Fast Track might be required. Ask Microsoft!
|
||||
Reference in New Issue
Block a user