Skip to content

Commit

Permalink
Merge pull request #632 from PowerShell/release-1.8
Browse files Browse the repository at this point in the history
Release 1.8
  • Loading branch information
kwirkykat authored Jul 12, 2017
2 parents a243d0d + 4f5387f commit d32ec50
Show file tree
Hide file tree
Showing 56 changed files with 1,841 additions and 410 deletions.
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Change log for SharePointDsc

## 1.7.0.0
## 1.8

* Fixed issue in SPServiceAppProxyGroup causing some service names to return as null
* Added TLS and SMTP port support for SharePoint 2016
* Fixed issue in SPWebApplication where the Get method didn't return Classic
web applications properly
* Fixed issue in SPSubscriptionSettingsServiceApp not returning database values
* Updated Readme of SPInstall to include SharePoint Foundation is not supported
* Fixed issue with Access Denied in SPDesignerSettings
* Fixed missing brackets in error message in SPExcelServiceApp
* Removed the requirement for the ConfigWizard in SPInstallLanguagePack
* Fixed Language Pack detection issue in SPInstallLanguagePack
* Added support to set Windows service accounts for search related services to
SPSearchServiceApp resource
* Fixed issue in SPCreateFarm and SPJoinFarm where an exception was not handled
correctly
* Fixed issue in SPSessionStateService not returning correct database server
and name
* Fixed missing Ensure property default in SPRemoteFarmTrust
* Fixed issue in SPWebAppGeneralSettings where -1 was returned for the TimeZone
* Fixed incorrect UsagePoint check in SPQuotaTemplate
* Fixed issue in SPWebAppPolicy module where verbose messages are causing errors
* Fixed incorrect parameter naming in Get method of SPUserProfilePropery
* Fixed issue in SPBlobCacheSettings when trying to declare same URL with
different zone
* Improve documentation on SPProductUpdate to specify the need to unblock downloaded
files
* Added check if file is blocked in SPProductUpdate to prevent endless wait
* Enhance SPUserProfileServiceApp to allow for NoILM to be enabled
* Fixed issue in SPUserProfileProperty where PropertyMapping was Null

## 1.7

* Update SPSearchIndexPartition made ServiceAppName as a Key
* New resouce: SPTrustedRootAuthority
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class MSFT_SPBlobCacheSettings : OMI_BaseResource
{
[Key, Description("The URL of the web application")] string WebAppUrl;
[Required, Description("The zone of the web application for which blob cache has to be configured"), ValueMap{"Default","Intranet","Internet","Custom","Extranet"}, Values{"Default","Intranet","Internet","Custom","Extranet"}] string Zone;
[Key, Description("The zone of the web application for which blob cache has to be configured"), ValueMap{"Default","Intranet","Internet","Custom","Extranet"}, Values{"Default","Intranet","Internet","Custom","Extranet"}] string Zone;
[Required, Description("Specify if the blob cache has to be enabled")] Boolean EnableCache;
[Write, Description("The location where the blob cache has to store its files")] string Location;
[Write, Description("The maximum size (in GB) of disk space the blob cache is allowed to use")] Uint16 MaxSizeInGB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ function Get-TargetResource

$getSPMajorVersion = (Get-SPDSCInstalledProductVersion).FileMajorPart
$cfgDbRegKey = "hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\$getSPMajorVersion.0\Secure\ConfigDB"
$configDbDsn = Get-SPDSCRegistryKey -Key $cfgDbRegKey -Value "dsn"
try
{
$configDbDsn = Get-SPDSCRegistryKey -Key $cfgDbRegKey -Value "dsn"
}
catch
{
Write-Verbose -Message "SharePoint registry key cannot be found."
}
$serverIsJoined = $true

if ($null -eq $configDbDsn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ function Get-TargetResource
}

# Check if site collections exists
$site = Get-SPSite | Where-Object -FilterScript {
$_.Url -eq $params.Url
}
$site = Get-SPSite -Identity $params.Url -ErrorAction SilentlyContinue
if ($null -eq $site)
{
Write-Verbose -Message ("Site collection not found. SharePoint " + `
Expand Down Expand Up @@ -301,9 +299,7 @@ function Set-TargetResource
Write-Verbose -Message "Start update SPD site collection settings"

# Check if site collection exists
$site = Get-SPSite | Where-Object -FilterScript {
$_.Url -eq $url
}
$site = Get-SPSite -Identity $params.Url -ErrorAction SilentlyContinue
if ($null -eq $site)
{
throw ("Site collection not found. SharePoint Designer settings " + `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ function Get-TargetResource

if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15)
{
throw [Exception] "Only SharePoint 2013 is supported to deploy Excel Services " + `
"service applicaions via DSC, as SharePoint 2016 deprecated " + `
"this service. See " + `
"https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + `
"for more info."
throw [Exception] ("Only SharePoint 2013 is supported to deploy Excel Services " + `
"service applications via DSC, as SharePoint 2016 deprecated " + `
"this service. See " + `
"https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + `
"for more info.")
}

$result = Invoke-SPDSCCommand -Credential $InstallAccount `
Expand Down Expand Up @@ -313,11 +313,11 @@ function Set-TargetResource

if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15)
{
throw [Exception] "Only SharePoint 2013 is supported to deploy Excel Services " + `
"service applicaions via DSC, as SharePoint 2016 deprecated " + `
"this service. See " + `
"https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + `
"for more info."
throw [Exception] ("Only SharePoint 2013 is supported to deploy Excel Services " + `
"service applications via DSC, as SharePoint 2016 deprecated " + `
"this service. See " + `
"https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + `
"for more info.")
}
$result = Get-TargetResource @PSBoundParameters

Expand Down Expand Up @@ -571,11 +571,11 @@ function Test-TargetResource

if ((Get-SPDSCInstalledProductVersion).FileMajorPart -ne 15)
{
throw [Exception] "Only SharePoint 2013 is supported to deploy Excel Services " + `
"service applicaions via DSC, as SharePoint 2016 deprecated " + `
"this service. See " + `
"https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + `
"for more info."
throw [Exception] ("Only SharePoint 2013 is supported to deploy Excel Services " + `
"service applications via DSC, as SharePoint 2016 deprecated " + `
"this service. See " + `
"https://technet.microsoft.com/en-us/library/mt346112(v=office.16).aspx " + `
"for more info.")
}

$CurrentValues = Get-TargetResource @PSBoundParameters
Expand Down
4 changes: 4 additions & 0 deletions Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ itself). The ProductKey parameter is used to inject in to the configuration
file and validate the license key during the installation process. This module
depends on the prerequisites already being installed, which can be done

NOTE: This resource only supports SharePoint Server. SharePoint Foundation
is not supported. For examples to install SharePoint Foundation using DSC, see:
https://github.com/PowerShell/SharePointDsc/wiki/SPInstall (Example 3)

## Installing from network locations

If you wish to install SharePoint from a network location this can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,50 @@ function Get-TargetResource
throw "Unknown folder structure"
}

$products = Invoke-SPDSCCommand -Credential $InstallAccount `
-ScriptBlock {
return Get-SPDscRegProductsInfo
$products = Get-SPDscRegProductsInfo

$englishProducts = @()
foreach ($product in $products)
{
$parsedProduct = $product -split " - "
switch -Regex ($parsedProduct)
{
"Dari" { $languageEN = "Dari"}
"Serbian" {
if ($parsedProduct[1] -match "srpski")
{
$languageEN = "Serbian (Latin)"
}
else
{
$languageEN = "Serbian (Cyrillic)"
}
}
"Chinese" {
$parsedENProduct = $parsedProduct[1] -split "/"
$languageEN = $parsedENProduct[0]
}
"Portuguese" {
if ($parsedProduct[1] -match "\(Brasil\)")
{
$languageEN = "Portuguese (Brasil)"
}
else
{
$languageEN = "Portuguese (Portugal)"
}
}
Default {
$parsedENProduct = $parsedProduct[1] -split "/"
$parsedENProduct = $parsedENProduct[0] -split " "
$languageEN = $parsedENProduct[0]
}
}
$englishProducts += $languageEN
}

# Extract language from filename
if ($osrvFolder.Name -match "\w*.(\w{2}-\w{2})")
if ($osrvFolder.Name -match "\w*.(\w{2,3}-\w*-?\w*)")
{
$language = $matches[1]
}
Expand All @@ -75,57 +112,50 @@ function Get-TargetResource
}

# Extract English name of the language code
if ($cultureInfo.EnglishName -match "(\w*,*\s*\w*) \(\w*\)")
$updateLanguage = $cultureInfo.EnglishName
switch ($cultureInfo.EnglishName)
{
$languageEnglish = $matches[1]
if ($languageEnglish.contains(","))
{
$languages = $languageEnglish.Split(",")
$languageEnglish = $languages[0]
}
}

# Extract Native name of the language code
if ($cultureInfo.NativeName -match "(\w*,*\s*\w*) \(\w*\)")
{
$languageNative = $matches[1]
if ($languageNative.contains(","))
{
$languages = $languageNative.Split(",")
$languageNative = $languages[0]
"Dari (Afghanistan)" { $languageEnglish = "Dari" }
"Chinese (Simplified, China)" { $languageEnglish = "Chinese (PRC)" }
"Chinese (Traditional, Taiwan)" { $languageEnglish = "Chinese (Taiwan)" }
"Portuguese (Brazil)" { $languageEnglish = "Portuguese (Brasil)" }
"Portuguese (Portugal)" { $languageEnglish = "Portuguese (Portugal)" }
"Serbian (Cyrillic, Serbia)" { $languageEnglish = "Serbian (Cyrillic)" }
"Serbian (Latin, Serbia)" { $languageEnglish = "Serbian (Latin)" }
Default {
if ($cultureInfo.EnglishName -match "(\w*,*\s*\w*) \([^)]*\)")
{
$languageEnglish = $matches[1]
$updateLanguage = $matches[0]
if ($languageEnglish.contains(","))
{
$languages = $languageEnglish.Split(",")
$languageEnglish = $languages[0]
}
}
}
}

# Build language string used in Language Pack names
$languageString = "$languageEnglish/$languageNative"

Write-Verbose -Message "Update is for the $languageEnglish language"

# Find the product name for the specific language pack
$productName = ""
foreach ($product in $products)
{
if ($product -match $languageString)
{
$productName = $product
}
}

if ($productName -eq "")
if ($englishProducts -contains $languageEnglish -eq $true)
{
Write-Verbose -Message "Language Pack $languageEnglish is found"
return @{
BinaryDir = $BinaryDir
BinaryInstallDays = $BinaryInstallDays
BinaryInstallTime = $BinaryInstallTime
Ensure = "Absent"
Ensure = "Present"
}
}
else
{
Write-Verbose -Message "Language Pack $languageEnglish is NOT found"
return @{
BinaryDir = $BinaryDir
BinaryInstallDays = $BinaryInstallDays
BinaryInstallTime = $BinaryInstallTime
Ensure = "Present"
Ensure = "Absent"
}
}
}
Expand Down Expand Up @@ -257,19 +287,6 @@ function Set-TargetResource
$wssRegKey ="hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\WSS"
}

# Read LanguagePackInstalled and SetupType registry keys
$languagePackInstalled = Get-SPDSCRegistryKey -Key $wssRegKey -Value "LanguagePackInstalled"
$setupType = Get-SPDSCRegistryKey -Key $wssRegKey -Value "SetupType"

# Determine if LanguagePackInstalled=1 or SetupType=B2B_Upgrade.
# If so, the Config Wizard is required, so the installation will be skipped.
if (($languagePackInstalled -eq 1) -or ($setupType -eq "B2B_UPGRADE"))
{
Write-Verbose -Message ("An upgrade is pending. " + `
"To prevent a possible loop, the install will be skipped")
return
}

Write-Verbose -Message "Writing install config file"

$configPath = "$env:temp\SPInstallLanguagePackConfig.xml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ function Get-TargetResource

$getSPMajorVersion = (Get-SPDSCInstalledProductVersion).FileMajorPart
$cfgDbRegKey = "hklm:SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\$getSPMajorVersion.0\Secure\ConfigDB"
$configDbDsn = Get-SPDSCRegistryKey -Key $cfgDbRegKey -Value "dsn"
try
{
$configDbDsn = Get-SPDSCRegistryKey -Key $cfgDbRegKey -Value "dsn"
}
catch
{
Write-Verbose -Message "SharePoint registry key cannot be found."
}
$serverIsJoined = $true

if ($null -eq $configDbDsn)
Expand Down
Loading

0 comments on commit d32ec50

Please sign in to comment.