Skip to content

Commit

Permalink
Merge pull request #591 from PowerShell/release-1.7
Browse files Browse the repository at this point in the history
Release 1.7
  • Loading branch information
kwirkykat committed May 31, 2017
2 parents e693edb + 0a35bb9 commit a243d0d
Show file tree
Hide file tree
Showing 176 changed files with 8,597 additions and 398 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,54 @@
# Change log for SharePointDsc

## 1.7.0.0

* Update SPSearchIndexPartition made ServiceAppName as a Key
* New resouce: SPTrustedRootAuthority
* Update SPFarmSolution to eject from loop after 30m.
* New resource: SPMachineTranslationServiceApp
* New resource: SPPowerPointAutomationServiceApp
* Bugfix in SPSearchFileType made ServiceAppName a key property.
* New resource: SPWebApplicationExtension
* Added new resource SPAccessServices2010
* Added MSFT_SPSearchCrawlMapping Resource to manage Crawl Mappings for
Search Service Application
* Added new resource SPSearchAuthoritativePage
* Bugfix in SPWebAppThrottlingSettings for setting large list window time.
* Fix typo in method Get-TargetResource of SPFeature
* Fix bug in SPManagedAccount not returning the correct account name value
* Fix typo in method Get-TargetResource of SPSearchIndexPartition
* Update documentation of SPInstallLanguagePack to add guidance on package
change in SP2016
* Added returning the required RunCentralAdmin parameter to
Get-TargetResource in SPFarm
* Added web role check for SPBlobCacheSettings
* Improved error message when rule could not be found in
SPHealthAnalyzerRuleState
* Extended the documentation to specify that the default value of Ensure
is Present
* Added documentation about the user of Host Header Site Collections and
the HostHeader parameter in SPWebApplication
* Fixed missing brackets in SPWebAppPolicy module file
* Fixed issue with SPSecureStoreServiceApp not returning database information
* Fixed issue with SPManagedMetadataServiceApp not returning ContentTypeHubUrl
in SP2016
* Updated SPTrustedIdentityTokenIssuer to allow to specify the signing
certificate from file path as an alternative to the certificate store
* New resource: SPSearchCrawlerImpactRule
* Fixed issue in SPSite where the used template wasn't returned properly
* Fixed issue in SPWebApplicationGeneralSettings which didn't return the
security validation timeout properly
* Fixed bug in SPCreateFarm and SPJoinFarm when a SharePoint Server is already
joined to a farm
* Bugfix in SPContentDatabase for setting WarningSiteCount as 0.
* Fixing verbose message that identifies SP2016 as 2013 in MSFT_SPFarm
* Fixed SPProductUpdate looking for OSearch15 in SP2016 when stopping services
* Added TermStoreAdministrators property to SPManagedMetadataServiceApp
* Fixed an issue in SPSearchTopology that would leave a corrupt topology in
place if a server was removed and re-added to a farm
* Fixed bug in SPFarm that caused issues with database names that have dashes
in the names

## 1.6

* Updated SPWebApplication to allow Claims Authentication configuration
Expand Down
Expand Up @@ -3,3 +3,6 @@
This resource is responsible for creating Access Services Application instances
within the local SharePoint farm. The resource will provision and configure the
Access Services Service Application.

The default value for the Ensure parameter is Present. When not specifying this
parameter, the service application is provisioned.
@@ -0,0 +1,185 @@
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Name,

[parameter(Mandatory = $true)]
[System.String]
$ApplicationPool,

[ValidateSet("Present","Absent")]
[System.String]
$Ensure = "Present",

[System.Management.Automation.PSCredential]
$InstallAccount
)

Write-Verbose -Message "Getting Access 2010 Service app '$Name'"

$result = Invoke-SPDSCCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]
$serviceApps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
$nullReturn = @{
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Ensure = "Absent"
}
if($null -eq $serviceApps)
{
return $nullReturn
}

$serviceApp = $serviceApps | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.Office.Access.Server.MossHost.AccessServerWebServiceApplication"
}

if($null -eq $serviceApp)
{
return $nullReturn
}
else
{
return @{
Name = $serviceApp.DisplayName
ApplicationPool = $serviceApp.ApplicationPool.Name
Ensure = "Present"
InstallAccount = $params.InstallAccount
}
}
}
return $result
}

function Set-TargetResource
{
[CmdletBinding()]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Name,

[parameter(Mandatory = $true)]
[System.String]
$ApplicationPool,

[ValidateSet("Present","Absent")]
[System.String]
$Ensure = "Present",

[System.Management.Automation.PSCredential]
$InstallAccount
)

Write-Verbose -Message "Setting Access 2010 Services app '$Name'"
$result = Get-TargetResource @PSBoundParameters

if($result.Ensure -eq "Absent" -and $Ensure -eq "Present")
{
Write-Verbose "Creating Access 2010 Service Application '$Name'"
Invoke-SPDSCCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]
$accessApp = New-SPAccessServiceApplication -Name $params.Name `
-ApplicationPool $params.ApplicationPool
}
}
if($result.Ensure -eq "Present" -and $Ensure -eq "Present")
{
Write-Verbose "Updating Access 2010 service application '$Name'"
Invoke-SPDSCCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]
$apps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
if($null -ne $apps)
{
$app = $apps | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.Office.Access.Server.MossHost.AccessServerWebServiceApplication"
}
if($null -ne $app)
{
$appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool
if($null -ne $appPool)
{
$app.ApplicationPool = $appPool
$app.Update()
return;
}
}
}

$accessApp = New-SPAccessServiceApplication -Name $params.Name `
-ApplicationPool $params.ApplicationPool
}
}
if($Ensure -eq "Absent")
{
Write-Verbose "Removing Access 2010 service application '$Name'"
Invoke-SPDSCCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]

$apps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
if($null -eq $apps)
{
return
}

$app = $apps | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.Office.Access.Server.MossHost.AccessServerWebServiceApplication"
}

if($null -ne $app)
{
Remove-SPServiceApplication -Identity $app -Confirm:$false
}
}
}
}

function Test-TargetResource
{
[CmdletBinding()]
[OutputType([System.Boolean])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Name,

[parameter(Mandatory = $true)]
[System.String]
$ApplicationPool,

[ValidateSet("Present","Absent")]
[System.String]
$Ensure = "Present",

[System.Management.Automation.PSCredential]
$InstallAccount
)
Write-Verbose -Message "Testing Access 2010 service app '$Name'"

$PSBoundParameters.Ensure = $Ensure
$CurrentValues = Get-TargetResource @PSBoundParameters

return Test-SPDscParameterState -CurrentValues $CurrentValues `
-DesiredValues $PSBoundParameters `
-ValuesToCheck @("Name", "ApplicationPool", "Ensure")
}

Export-ModuleMember -Function *-TargetResource
@@ -0,0 +1,9 @@

[ClassVersion("1.0.0.0"), FriendlyName("SPAccessServices2010")]
class MSFT_SPAccessServices2010 : OMI_BaseResource
{
[Key, Description("The name of the service application")] String Name;
[Required, Description("The name of the application pool to run the service app in")] String ApplicationPool;
[Write, Description("Present ensures service app exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, EmbeddedInstance("MSFT_Credential"), Description("POWERSHELL 4 ONLY: The account to run thsi resource as, use PsDscRunAsCredential if using PowerShell 5")] String InstallAccount;
};
Expand Up @@ -4,3 +4,6 @@ This resource is used to define an alternate access mapping URL for a specified
web application. These can be assigned to specific zones for each web
application. Alternatively a URL can be removed from a zone to ensure that it
will remain empty and have no alternate URL.

The default value for the Ensure parameter is Present. When not specifying this
parameter, the setting is configured.
Expand Up @@ -8,3 +8,6 @@ the application pool associated to the app if it does not match the
configuration. Database names or server name will not be changed if the
configuration does not match, these parameters are only used for the initial
provisioning of the service application.

The default value for the Ensure parameter is Present. When not specifying this
parameter, the service application is provisioned.
Expand Up @@ -8,3 +8,6 @@ account associated to the app if it does not match the configuration. Database
names or server name will not be changed if the configuration does not match,
these parameters are only used for the initial provisioning of the service
application.

The default value for the Ensure parameter is Present. When not specifying this
parameter, the service application is provisioned.
Expand Up @@ -45,6 +45,27 @@ function Get-TargetResource
-ScriptBlock {
$params = $args[0]

$webappsi = Get-SPServiceInstance -Server $env:COMPUTERNAME `
-ErrorAction SilentlyContinue `
| Where-Object -FilterScript {
$_.TypeName -eq "Microsoft SharePoint Foundation Web Application"
}

if ($null -eq $webappsi)
{
Write-Verbose -Message "Server isn't running the Web Application role"
return @{
WebAppUrl = $null
Zone = $null
EnableCache = $false
Location = $null
MaxSizeInGB = $null
MaxAgeInSeconds = $null
FileTypes = $null
InstallAccount = $params.InstallAccount
}
}

$wa = Get-SPWebApplication -Identity $params.WebAppUrl `
-ErrorAction SilentlyContinue

Expand Down Expand Up @@ -215,6 +236,17 @@ function Set-TargetResource
$params = $args[0]
$changes = $args[1]

$webappsi = Get-SPServiceInstance -Server $env:COMPUTERNAME `
-ErrorAction SilentlyContinue `
| Where-Object -FilterScript {
$_.TypeName -eq "Microsoft SharePoint Foundation Web Application"
}

if ($null -eq $webappsi)
{
throw "Server isn't running the Web Application role"
}

$wa = Get-SPWebApplication -Identity $params.WebAppUrl -ErrorAction SilentlyContinue

if ($null -eq $wa)
Expand Down
Expand Up @@ -257,7 +257,7 @@ function Set-TargetResource
}

# Check and change site count settings
if ($params.WarningSiteCount -and $params.WarningSiteCount -ne $cdb.WarningSiteCount)
if ($null -ne $params.WarningSiteCount -and $params.WarningSiteCount -ne $cdb.WarningSiteCount)
{
$cdb.WarningSiteCount = $params.WarningSiteCount
}
Expand Down
Expand Up @@ -5,3 +5,6 @@ and configure these databases. Note: The resource cannot be used to move the
database to a different SQL instance. It will throw an error when it detects
that the specified SQL instance is a different instance that is currently in
use.

The default value for the Ensure parameter is Present. When not specifying this
parameter, the content database is provisioned.

0 comments on commit a243d0d

Please sign in to comment.