Skip to content

Commit

Permalink
Merge pull request #763 from PowerShell/release-2.1
Browse files Browse the repository at this point in the history
Release 2.1
  • Loading branch information
kwirkykat authored Feb 8, 2018
2 parents d66ec89 + 80c2685 commit cdf095c
Show file tree
Hide file tree
Showing 84 changed files with 4,019 additions and 2,015 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ _Please provide the following information regarding your issue (place N/A if cer

**Version of the Operating System and PowerShell the DSC Target Node is running:**

**Version of SharePoint that is used (e.g. SharePoint 2016):**

**Version of the DSC module you're using:**


Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Change log for SharePointDsc

## 2.1

* General
* Updated the integration tests for building the Azure environment
* Works in any Azure environment.
* Updated the SqlServer configuration to use SqlServerDsc version 10.0.0.0.
* SPAlternateURL
* Added the ability to manage the Central Administration AAMs
* SPDiagnosticsProvider
* Added the resource
* SPFarm
* Corrected issue where ServerRole parameter is returned in SP2013
* SPInfoPathFormsServiceConfig
* Added the resource
* SPInstallPrereqs
* Fixed two typos in to be installed Windows features for SharePoint 2016
* SPSearchAutoritativePage
* Added missing readme.md
* SPSearchCrawlerImpactRule
* Fixed issue where an error was thrown when retrieving Crawl Impact rules
* Added missing readme.md
* SPSearchCrawlMapping
* Added missing readme.md
* SPSecureStoreServiceApp
* Fixed issue in Get-TargetResource to return AuditingEnabled property
* SPSecurityTokenServiceConfig
* Added the resource
* SPServiceIdentity
* Fixed issue with correctly retrieving the process identity for the
Search instance
* Added support for LocalSystem, LocalService and NetworkService
* SPUserProfileProperty
* Fixed issues with the User Profile properties for 2016
* SPUserProfileServiceAppPermissions
* Removed the mandatory requirement from secondary parameters
* SPUserProfileSyncConnection
* Fixed issues with the User Profile Sync connection for SharePoint
2016
* SPUserProfileSyncService
* Added returning the FarmAccount to the Get method
* SPWebAppAuthentication
* Corrected issue where parameter validation wasn't performed correctly
* SPWebApplicationExtension
* Fixed issue with test always failing when Ensure was set to Absent
* SPWorkManagementServiceApp
* Added check for SharePoint 2016, since this functionality has been
removed in SharePoint 2016

## 2.0

* General
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ function Get-TargetResource
param
(
[Parameter(Mandatory = $true)]
[System.String]
[System.String]
$WebAppName,

[Parameter(Mandatory = $true)]
[ValidateSet("Default","Intranet","Extranet","Custom","Internet")]
[System.String]
[Parameter(Mandatory = $true)]
[ValidateSet("Default","Intranet","Extranet","Custom","Internet")]
[System.String]
$Zone,

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

[Parameter()]
[System.Boolean]
[Parameter()]
[System.Boolean]
$Internal = $false,

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

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

Expand All @@ -41,7 +41,7 @@ function Get-TargetResource
$aam = Get-SPAlternateURL -Identity $params.Url `
-ErrorAction SilentlyContinue

if ($null -eq $aam)
if ($null -eq $aam)
{
return @{
WebAppName = $params.WebAppName
Expand All @@ -60,7 +60,7 @@ function Get-TargetResource
$wa = Get-SPWebApplication -Identity $aam.PublicUrl

return @{
WebAppName = $wa.Name
WebAppName = $wa.DisplayName
Zone = $aam.Zone
Url = $aam.IncomingUrl
Internal = $internal
Expand All @@ -77,43 +77,45 @@ function Set-TargetResource
param
(
[Parameter(Mandatory = $true)]
[System.String]
[System.String]
$WebAppName,

[Parameter(Mandatory = $true)]
[ValidateSet("Default","Intranet","Extranet","Custom","Internet")]
[System.String]
[Parameter(Mandatory = $true)]
[ValidateSet("Default","Intranet","Extranet","Custom","Internet")]
[System.String]
$Zone,

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

[Parameter()]
[System.Boolean]
[Parameter()]
[System.Boolean]
$Internal = $false,
[Parameter()]
[ValidateSet("Present","Absent")]
[System.String]

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

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

)

Write-Verbose -Message "Setting Alternate URL for $Zone in $WebAppName"

if ($Ensure -eq "Present")
if ($Ensure -eq "Present")
{
Invoke-SPDSCCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]

$webapp = Get-SPWebApplication $params.WebAppName
$webapp = Get-SPWebApplication -IncludeCentralAdministration | Where-Object -FilterScript {
$_.DisplayName -eq $params.WebAppName
}

if ($null -eq $webapp)
{
Expand All @@ -123,22 +125,22 @@ function Set-TargetResource
$urlAam = Get-SPAlternateURL -Identity $params.Url `
-ErrorAction SilentlyContinue

$webAppAams = Get-SPAlternateURL -WebApplication $params.WebAppName `
$webAppAams = Get-SPAlternateURL -WebApplication $webapp `
-Zone $params.Zone `
-ErrorAction SilentlyContinue

if ($null -eq $webAppAams)
if ($null -eq $webAppAams)
{
# No AAM found on specified WebApp in specified Zone
if ($null -eq $urlAam)
{
# urlAAM not found, so it is safe to create AAM on specified zone
$cmdParams = @{
WebApplication = $params.WebAppName
WebApplication = $webapp
Url = $params.Url
Zone = $params.Zone
}
if (($params.ContainsKey("Internal") -eq $true))
if ($params.ContainsKey("Internal") -eq $true)
{
$cmdParams.Add("Internal", $params.Internal)
}
Expand All @@ -149,12 +151,12 @@ function Set-TargetResource
throw ("Specified URL found on different WebApp/Zone: WebApp " + `
"$($urlAam.PublicUrl) in zone $($urlAam.Zone)")
}
}
else
}
else
{
# WebApp has one or more AAMs, check for URL
$aamForUrl = $webAppAams | Where-Object -FilterScript {
$_.IncomingUrl -eq $params.Url
$_.IncomingUrl -eq $params.Url
}

if ($null -eq $aamForUrl)
Expand All @@ -164,7 +166,7 @@ function Set-TargetResource
{
# urlAAM not found, so it is safe to create AAM on specified zone
$cmdParams = @{
WebApplication = $params.WebAppName
WebApplication = $webapp
Url = $params.Url
Zone = $params.Zone
}
Expand Down Expand Up @@ -202,8 +204,8 @@ function Set-TargetResource
}
}
}
}
else
}
else
{
Invoke-SPDSCCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
Expand All @@ -214,7 +216,7 @@ function Set-TargetResource

Remove-SPAlternateURL -Identity $aam -Confirm:$false
}
}
}
}

function Test-TargetResource
Expand All @@ -224,35 +226,35 @@ function Test-TargetResource
param
(
[Parameter(Mandatory = $true)]
[System.String]
[System.String]
$WebAppName,

[Parameter(Mandatory = $true)]
[ValidateSet("Default","Intranet","Extranet","Custom","Internet")]
[System.String]
[Parameter(Mandatory = $true)]
[ValidateSet("Default","Intranet","Extranet","Custom","Internet")]
[System.String]
$Zone,

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

[Parameter()]
[System.Boolean]
[Parameter()]
[System.Boolean]
$Internal = $false,

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

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

)

Write-Verbose -Message "Testing Alternate URL for $Zone in $WebAppName"

$PSBoundParameters.Ensure = $Ensure
$PSBoundParameters.Internal = $Internal

Expand All @@ -266,7 +268,7 @@ function Test-TargetResource
"Ensure", `
"Internal")
}
else
else
{
return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) `
-DesiredValues $PSBoundParameters `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ 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.

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.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ file directly and is NOT using the SPWebConfigModifications class. In order
to configure all WFE servers in the farm, you have to apply this resource
to all servers.

Note:

- In order to prevent inconsistancy between different web front end servers,
make sure you configure this setting on all servers equally.
- If the specified folder does not exist, the resource will create the folder.
NOTE:
In order to prevent inconsistancy between different web front end servers,
make sure you configure this setting on all servers equally.
If the specified folder does not exist, the resource will create the folder.

Best practice:
Specify a directory that is not on the same drive as where either the server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Description

This resource is used to add and remove Content Databases to web applications
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.
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.
Loading

0 comments on commit cdf095c

Please sign in to comment.