Skip to content

Commit

Permalink
Merge pull request #1395 from ChristophHannappel/fix/SPWebApplication…
Browse files Browse the repository at this point in the history
…SecureSocketsLayer

SPWebApplication: Use of SecureSocketsLayer Parameter
  • Loading branch information
ykuijs committed Mar 9, 2022
2 parents fe2111d + 878fe84 commit 1ee98a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- SPWebApplication
- Fixed an issue where the Set method tried to use the Parameter SecureSocketsLayer with Set-SPWebApplication on SharePoint Server older than Subscription Edition.

## [5.1.0] - 2022-02-24

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,6 @@ function Set-TargetResource
{
$updateWebAppParams.Add("AllowLegacyEncryption", $params.AllowLegacyEncryption)
}
if ((New-Object -TypeName System.Uri $params.WebAppUrl).Scheme -eq "https")
{
$updateWebAppParams.Add("SecureSocketsLayer", $true)
}

$productVersion = Get-SPDscInstalledProductVersion
if ($productVersion.FileMajorPart -eq 16 -and `
Expand All @@ -636,6 +632,11 @@ function Set-TargetResource
{
$updateWebAppParams.Add("Port", $params.Port)
}

if ((New-Object -TypeName System.Uri $params.WebAppUrl).Scheme -eq "https")
{
$updateWebAppParams.Add("SecureSocketsLayer", $true)
}
}

Write-Verbose -Message "Updating web application with these parameters: $(Convert-SPDscHashtableToString -Hashtable $updateWebAppParams)"
Expand Down

0 comments on commit 1ee98a0

Please sign in to comment.