Skip to content

Commit

Permalink
Merge pull request #785 from PowerShell/release-2.2
Browse files Browse the repository at this point in the history
Release 2.2
  • Loading branch information
kwirkykat authored Mar 21, 2018
2 parents cdf095c + b1cd1ea commit 5eee020
Show file tree
Hide file tree
Showing 30 changed files with 1,709 additions and 403 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Change log for SharePointDsc

## 2.2

* SPAlternateURL
* If resource specifies Central Admin webapp and Default Zone, the existing
AAM will be updated instead of adding a new one
* SPContentDatabase
* Fixed issue where mounting a content database which had to be upgraded
resulted in a reboot.
* SPDistributedCacheClientSettings
* Added the new resource
* SPFarmAdministrators
* Fixed issue where member comparisons was case sensitive. This had
to be case insensitive.
* SPManagedMetadataServiceApp
* Fixed issue with creating the Content Type Hub on an existing MMS
service app without Content Type Hub.
* SPManagedMetadataServiceAppDefault
* Fixed issue where .GetType().FullName and TypeName were not used
properly.
* SPTimerJobState
* Updated description of WebAppUrl parameter to make it clear that
"N/A" has to be used to specify a global timer job.
* SPUserProfileServiceApp
* Fixed issue introduced in v2.0, where the Farm Account had to have
local Administrator permissions for the resource to function properly.
* Updated resource to retrieve the Farm account from the Managed Accounts
instead of requiring it as a parameter.
* SPUserProfileSyncService
* Fixed issue introduced in v2.0, where the Farm Account had to have
local Administrator permissions for the resource to function properly.
* Updated resource to retrieve the Farm account from the Managed Accounts
instead of requiring it as a parameter.
* The FarmAccount parameter is deprecated and no longer required. Is ignored
in the code and will be removed in v3.0.
* SPVisioServiceApp
* Fixed an issue where the proxy is not properly getting created

## 2.1

* General
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,30 @@ function Set-TargetResource
# URL not configured on WebApp
if ($null -eq $urlAam)
{
# urlAAM not found, so it is safe to create AAM on specified zone
$cmdParams = @{
WebApplication = $webapp
Url = $params.Url
Zone = $params.Zone
# urlAAM not found, so it is safe to create AAM on specified zone (or modify existing if CA)
# If this is Central Admin and Default zone, we want to update the existing AAM instead of adding a new one
if ($webapp.IsAdministrationWebApplication -and $params.Zone -eq "Default")
{
# web app is Central Administration and Default zone

# If CA has more than 1 AAM in Default zone, Set-SPAlternateUrl should consolidate into 1
# For additional CA servers, use other zones instead of Default

Set-SPAlternateURL -Identity $webApp.Url -Url $params.Url -Zone $params.Zone | Out-Null
}
if (($params.ContainsKey("Internal") -eq $true))
else
{
$cmdParams.Add("Internal", $params.Internal)
$cmdParams = @{
WebApplication = $webapp
Url = $params.Url
Zone = $params.Zone
}
if (($params.ContainsKey("Internal") -eq $true))
{
$cmdParams.Add("Internal", $params.Internal)
}
New-SPAlternateURL @cmdParams | Out-Null
}
New-SPAlternateURL @cmdParams | Out-Null
}
else
{
Expand Down
18 changes: 16 additions & 2 deletions Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,25 @@ 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.

## Central Administration

To select the Central Administration site, use the following command to retrieve
the correct web application name:
(Get-SPWebApplication -IncludeCentralAdministration | Where-Object {
$_.IsAdministrationWebApplication
}).DisplayName

The default value for the Ensure parameter is Present. When not specifying this
parameter, the setting is configured.
To update the existing Default Zone AAM for Central Administration (e.g. to
implement HTTPS), use the above command to retrieve the web application name
(by default, it will be "SharePoint Central Administration v4") and specify
"Default" as the Zone. If you wish to add AAM's instead, you may use the other
zones to do so.

Using SPAlternateUrl to update the Default Zone AAM for Central Administration
will update the AAM in SharePoint as well as the CentralAdministrationUrl value
in the registry. It will not, however, update bindings in IIS. It is recommended
to use the xWebsite resource from the xWebAdministration module to configure the
appropriate bindings in IIS.
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ function Get-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
$Name,

[Parameter()]
[System.String]
$DatabaseServer,

[Parameter(Mandatory = $true)]
[System.String]
$WebAppUrl,

[Parameter()]
[System.Boolean]
$Enabled,

[Parameter()]
[System.UInt16]
$WarningSiteCount,

[Parameter()]
[System.UInt16]
$MaximumSiteCount,

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

[Parameter()]
[System.Management.Automation.PSCredential]
$InstallAccount
Expand All @@ -44,7 +44,7 @@ function Get-TargetResource
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]

$cdb = Get-SPDatabase | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.Administration.SPContentDatabase" -and `
$_.Name -eq $params.Name
Expand Down Expand Up @@ -102,32 +102,32 @@ function Set-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
$Name,

[Parameter()]
[System.String]
$DatabaseServer,

[Parameter(Mandatory = $true)]
[System.String]
$WebAppUrl,

[Parameter()]
[System.Boolean]
$Enabled,

[Parameter()]
[System.UInt16]
$WarningSiteCount,

[Parameter()]
[System.UInt16]
$MaximumSiteCount,

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

[Parameter()]
[System.Management.Automation.PSCredential]
$InstallAccount
Expand Down Expand Up @@ -184,7 +184,7 @@ function Set-TargetResource
{
$newParams.$($param.Key) = $param.Value
}

if ($param.Key -eq "MaximumSiteCount")
{
$newParams.MaxSiteCount = $param.Value
Expand Down Expand Up @@ -215,7 +215,7 @@ function Set-TargetResource
{
$cdbenabled = $false
}

if ($params.Enabled -ne $cdbenabled)
{
switch ($params.Enabled)
Expand All @@ -241,7 +241,7 @@ function Set-TargetResource
{
$cdbenabled = $false
}

if ($params.ContainsKey("Enabled") -and $params.Enabled -ne $cdbenabled)
{
switch ($params.Enabled)
Expand All @@ -256,13 +256,13 @@ function Set-TargetResource
}
}
}

# Check and change site count settings
if ($null -ne $params.WarningSiteCount -and $params.WarningSiteCount -ne $cdb.WarningSiteCount)
{
$cdb.WarningSiteCount = $params.WarningSiteCount
}

if ($params.MaximumSiteCount -and $params.MaximumSiteCount -ne $cdb.MaximumSiteCount)
{
$cdb.MaximumSiteCount = $params.MaximumSiteCount
Expand All @@ -280,12 +280,12 @@ function Set-TargetResource
{
$newParams.$($param.Key) = $param.Value
}

if ($param.Key -eq "MaximumSiteCount")
{
$newParams.MaxSiteCount = $param.Value
}

if ($param.Key -eq "WebAppUrl")
{
$newParams.WebApplication = $param.Value
Expand All @@ -311,8 +311,9 @@ function Set-TargetResource
{
$cdbenabled = $false
}

if ($params.Enabled -ne $cdbenabled)

if ($params.ContainsKey("Enabled") -eq $true -and `
$params.Enabled -ne $cdbenabled)
{
switch ($params.Enabled)
{
Expand Down Expand Up @@ -350,32 +351,32 @@ function Test-TargetResource
[Parameter(Mandatory = $true)]
[System.String]
$Name,

[Parameter()]
[System.String]
$DatabaseServer,

[Parameter(Mandatory = $true)]
[System.String]
$WebAppUrl,

[Parameter()]
[System.Boolean]
$Enabled,

[Parameter()]
[System.UInt16]
$WarningSiteCount,

[Parameter()]
[System.UInt16]
$MaximumSiteCount,

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

[Parameter()]
[System.Management.Automation.PSCredential]
$InstallAccount
Expand Down
Loading

0 comments on commit 5eee020

Please sign in to comment.