Skip to content

Commit

Permalink
Merge pull request #471 from PowerShell/release-1.5
Browse files Browse the repository at this point in the history
Release 1.5
  • Loading branch information
kwirkykat authored Dec 14, 2016
2 parents c4553e8 + 67accd4 commit 89d8949
Show file tree
Hide file tree
Showing 191 changed files with 3,442 additions and 1,482 deletions.
2 changes: 1 addition & 1 deletion .appveyor/appveyor.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Start-AppveyorAfterTestTask

# Add the appropriate build number to the manifest and zip/publish everything to appveyor
$manifest = Join-Path -Path $env:APPVEYOR_BUILD_FOLDER -ChildPath "modules\SharePointDsc\SharePointDsc.psd1"
(Get-Content $manifest -Raw).Replace("1.4.0.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest
(Get-Content $manifest -Raw).Replace("1.5.0.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest
$zipFileName = "SharePointDsc_$($env:APPVEYOR_BUILD_VERSION).zip"
[System.IO.Compression.ZipFile]::CreateFromDirectory($mainModulePath, "$env:APPVEYOR_BUILD_FOLDER\$zipFileName")
New-DscChecksum -Path $env:APPVEYOR_BUILD_FOLDER -Outpath $env:APPVEYOR_BUILD_FOLDER
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
.sln
Modules/SharePointDsc/DscResource.Tests
Modules/SharePointDsc/DscResource.Tests/*
node_modules
node_modules/*
markdownissues.txt
8 changes: 8 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"default": true,
"MD029": {
"style": "ordered"
},
"MD034": false,
"no-hard-tabs": true
}
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
// Place your settings in this file to overwrite the default settings
{
"powershell.scriptAnalysis.enable": true,
"powershell.scriptAnalysis.settingsPath": ".vscode/ScriptAnalyzerSettings.psd1"
"powershell.scriptAnalysis.settingsPath": ".vscode/ScriptAnalyzerSettings.psd1",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"node_modules": true,
"markdownissues.txt": true
}
}
432 changes: 265 additions & 167 deletions CHANGELOG.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**Description**
# Description

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.
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.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**Description**
# Description

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.
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.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
**Description**
# Description

This resource is used to set the global antivirus settings for the local farm. These settings
will be used to control the behavior of an external anti-virus scanning tool that is able to
integrate with SharePoint. Note that this will not scan documents for viruses on it's own, an
external tool still needs to be installed on the servers that integrates with SharePoint.
This resource is used to set the global antivirus settings for the local farm.
These settings will be used to control the behavior of an external anti-virus
scanning tool that is able to integrate with SharePoint. Note that this will
not scan documents for viruses on it's own, an external tool still needs to be
installed on the servers that integrates with SharePoint.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,16 @@ function Set-TargetResource
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]
Update-SPAppCatalogConfiguration -Site $params.SiteUrl -Confirm:$false
try
{
Update-SPAppCatalogConfiguration -Site $params.SiteUrl -Confirm:$false
}
catch [System.UnauthorizedAccessException]
{
throw ("This resource must be run as the farm account (not a setup account). " + `
"Please ensure either the PsDscRunAsCredential or InstallAccount " + `
"credentials are set to the farm account and run this resource again")
}
}
}

Expand Down
12 changes: 8 additions & 4 deletions Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
**Description**
# Description

This resource will ensure that a specific site collection is marked as the app catalog for
the web application that the site is in. The catalog site needs to have been created using
the correct template (APPCATALOG#0).
This resource will ensure that a specific site collection is marked as the app
catalog for the web application that the site is in. The catalog site needs to
have been created using the correct template (APPCATALOG#0).

This resource should be run using the farm account, and not another specific
setup account. Running this with the setup account you have used in your
configuration may relate to access denied errors.
6 changes: 3 additions & 3 deletions Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**Description**
# Description

This resource will set the value for the app domain settings at the farm level. You can set the
domain name and the prefix that is to be used for app URLs.
This resource will set the value for the app domain settings at the farm level.
You can set the domain name and the prefix that is to be used for app URLs.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
**Description**
# Description

This resource is used to provision and manage an instance of the App Management Services
Service Application. It will identify an instance of the app management service application
through the application display name. Currently the resource will provision the app if it does
not yet exist, and will change 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.
This resource is used to provision and manage an instance of the App Management
Services Service Application. It will identify an instance of the app
management service application through the application display name. Currently
the resource will provision the app if it does not yet exist, and will change
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.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**Description**
# Description

This resource will configure the ability to purchase apps for both SharePoint and Office apps.
This resource will configure the ability to purchase apps for both SharePoint
and Office apps.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
**Description**
# Description

This resource is used to provision and manage an instance of the Business Connectivity Services
Service Application. It will identify an instance of the BCS app through the application
display name. Currently the resource will provision the app if it does not yet exist, and will
change the service 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.
This resource is used to provision and manage an instance of the Business
Connectivity Services Service Application. It will identify an instance
of the BCS app through the application display name. Currently the resource
will provision the app if it does not yet exist, and will change the service
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.
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
**Description**
# Description

This resource is used to configure the Blob Cache settings for a web application.
This resource is used to configure the Blob Cache settings for a web
application.

Important:
This resource only configures the local server. It changes the web.config 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.
This resource only configures the local server. It changes the web.config
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.

- 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 operating system
swap files or server log files are stored.
Specify a directory that is not on the same drive as where either the server
operating system swap files or server log files are stored.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**Description**
# Description

This resource is used to set the "super user" and "super reader" cache accounts for the
specified web application object (as described in the TechNet article [Configure object
cache user accounts in SharePoint Server 2013](https://technet.microsoft.com/en-us/library/ff758656.aspx)).
This resource is used to set the "super user" and "super reader" cache accounts
for the specified web application object (as described in the TechNet article
[Configure object cache user accounts in SharePoint Server 2013](https://technet.microsoft.com/en-us/library/ff758656.aspx)).
10 changes: 6 additions & 4 deletions Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
**Description**
# Description

This resource is used to perform the upgrade step of installing SharePoint updates, like Cumulative Updates, Service Packs and Language Packs.
The DatabaseUpgradeDays and DatabaseUpgradeTime parameters specify a window in which the update can be installed.
This module has to be used to complete the update installation step, performed by SPProductUpdate.
This resource is used to perform the upgrade step of installing SharePoint
updates, like Cumulative Updates, Service Packs and Language Packs. The
DatabaseUpgradeDays and DatabaseUpgradeTime parameters specify a window in
which the update can be installed. This module has to be used to complete the
update installation step, performed by SPProductUpdate.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
**Description**
# 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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ function Get-TargetResource
[parameter(Mandatory = $false)]
[System.String]
[ValidateSet("Application",
"ApplicationWithSearch",
"Custom",
"DistributedCache",
"Search",
"SingleServer",
"SingleServerFarm",
"SpecialLoad",
"WebFrontEnd")]
"WebFrontEnd",
"WebFrontEndWithDistributedCache")]
$ServerRole
)

Expand All @@ -58,6 +59,18 @@ function Get-TargetResource
throw [Exception] "Server role is only supported in SharePoint 2016."
}

if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) `
-and (Get-SPDSCInstalledProductVersion).FileMajorPart -eq 16 `
-and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4456 `
-and ($ServerRole -eq "ApplicationWithSearch" `
-or $ServerRole -eq "WebFrontEndWithDistributedCache"))
{
throw [Exception] ("ServerRole values of 'ApplicationWithSearch' or " + `
"'WebFrontEndWithDistributedCache' require the SharePoint 2016 " + `
"Feature Pack 1 to be installed. See " + `
"https://support.microsoft.com/en-au/kb/3127940")
}

$result = Invoke-SPDSCCommand -Credential $InstallAccount `
-Arguments $PSBoundParameters `
-ScriptBlock {
Expand Down Expand Up @@ -147,13 +160,14 @@ function Set-TargetResource
[parameter(Mandatory = $false)]
[System.String]
[ValidateSet("Application",
"ApplicationWithSearch",
"Custom",
"DistributedCache",
"Search",
"SingleServer",
"SingleServerFarm",
"SpecialLoad",
"WebFrontEnd")]
"WebFrontEnd",
"WebFrontEndWithDistributedCache")]
$ServerRole
)

Expand All @@ -165,6 +179,18 @@ function Set-TargetResource
throw [Exception] "Server role is only supported in SharePoint 2016."
}

if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) `
-and (Get-SPDSCInstalledProductVersion).FileMajorPart -eq 16 `
-and (Get-SPDSCInstalledProductVersion).FileBuildPart -lt 4456 `
-and ($ServerRole -eq "ApplicationWithSearch" `
-or $ServerRole -eq "WebFrontEndWithDistributedCache"))
{
throw [Exception] ("ServerRole values of 'ApplicationWithSearch' or " + `
"'WebFrontEndWithDistributedCache' require the SharePoint 2016 " + `
"Feature Pack 1 to be installed. See " + `
"https://support.microsoft.com/en-au/kb/3127940")
}

$CurrentValues = Get-TargetResource @PSBoundParameters
if ([string]::IsNullOrEmpty($CurrentValues.FarmConfigDatabaseName) -eq $false)
{
Expand Down Expand Up @@ -276,13 +302,14 @@ function Test-TargetResource
[parameter(Mandatory = $false)]
[System.String]
[ValidateSet("Application",
"ApplicationWithSearch",
"Custom",
"DistributedCache",
"Search",
"SingleServer",
"SingleServerFarm",
"SpecialLoad",
"WebFrontEnd")]
"WebFrontEnd",
"WebFrontEndWithDistributedCache")]
$ServerRole
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class MSFT_SPCreateFarm : OMI_BaseResource
[Required, Description("The name of the admin content database")] String AdminContentDatabaseName;
[Write, Description("What port will Central Admin be provisioned to - default is 9999")] uint32 CentralAdministrationPort;
[Write, Description("The authentication provider of the CentralAdministration web application"), ValueMap{"NTLM","Kerberos"}, Values{"NTLM","Kerberos"}] String CentralAdministrationAuth;
[Write, Description("SharePoint 2016 only - the MinRole role to enroll this server as"), ValueMap{"Application","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","SpecialLoad","WebFrontEnd"}, Values{"Application","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","SpecialLoad","WebFrontEnd"}] string ServerRole;
[Write, Description("SharePoint 2016 only - the MinRole role to enroll this server as"), ValueMap{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}, Values{"Application","ApplicationWithSearch","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","WebFrontEnd","WebFrontEndWithDistributedCache"}] string ServerRole;
[Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount;
};
36 changes: 20 additions & 16 deletions Modules/SharePointDsc/DSCResources/MSFT_SPCreateFarm/Readme.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
**Description**
# Description

This resource is used to provision a new SharePoint farm. It should only be used on the first
server in the farm to create the configuration database, all servers to join the farm after the
first server creates the configuration database should use SPJoinFarm. Once the config DB has
been created, the resource will install local help collections, secure resources, activate
This resource is used to provision a new SharePoint farm. It should only be
used on the first server in the farm to create the configuration database, all
servers to join the farm after the first server creates the configuration
database should use SPJoinFarm. Once the config DB has been created, the
resource will install local help collections, secure resources, activate
features and provision the central admin site.

The passphrase is passed as a Credential object.The username of this credential is ignored, only
the value of the password is used as the farm passphrase.
The passphrase is passed as a Credential object.The username of this
credential is ignored, only the value of the password is used as the farm
passphrase.

The port of the Central Admin website can be set by using the CentralAdministrationPort property,
if this is not defined the site will be provisioned on port 9999. However this setting will not
impact existing deployments that already have Central Admin provisioned on another port. Also when
a farm is created, the current behavior is to not enroll the server as a cache server (which is
the default behavior of SharePoint). This means you need to use SPDistributedCacheService on at
least one server in the farm to designate it as a cache server.
The port of the Central Admin website can be set by using the
CentralAdministrationPort property, if this is not defined the site will be
provisioned on port 9999. However this setting will not impact existing
deployments that already have Central Admin provisioned on another port. Also
when a farm is created, the current behavior is to not enroll the server as a
cache server (which is the default behavior of SharePoint). This means you
need to use SPDistributedCacheService on at least one server in the farm to
designate it as a cache server.

CentralAdministrationAuth can be specified as "NTLM" or "KERBEROS". If not specified, it defaults
to NTLM. If using Kerberos, make sure to have appropriate SPNs setup for Farm account and Central
Administration URI.
CentralAdministrationAuth can be specified as "NTLM" or "KERBEROS". If not
specified, it defaults to NTLM. If using Kerberos, make sure to have
appropriate SPNs setup for Farm account and Central Administration URI.
Loading

0 comments on commit 89d8949

Please sign in to comment.