Skip to content

Commit 672e6cb

Browse files
committed
Merge branch 'master' of https://github.com/PowerShell/SharePointDsc into release-3.3
2 parents 9299874 + d687e13 commit 672e6cb

File tree

120 files changed

+12382
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+12382
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
* Changes to SharePointDsc unit testing
5656
* Implemented Strict Mode version 1 for all code run during unit tests.
57-
* Changed InstallAccount into PSDscRunAsCredential parameter
57+
* Changed InstallAccount into PSDscRunAsCredential parameter in examples
5858
* SPAuthenticationRealm
5959
* New resource for setting farm authentication realm
6060
* SPConfigWizard

Modules/SharePointDsc/SharePointDsc.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ PrivateData = @{
115115
PSData = @{
116116

117117
# Tags applied to this module. These help with module discovery in online galleries.
118-
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource', 'preview')
118+
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource')
119119

120120
# A URL to the license for this module.
121121
LicenseUri = 'https://github.com/PowerShell/SharePointDsc/blob/master/LICENSE'
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
.NAME
2+
SPAccessServiceApp
3+
4+
# Description
5+
6+
**Type:** Distributed
7+
**Requires CredSSP:** No
8+
9+
This resource is responsible for creating Access Services Application instances
10+
within the local SharePoint farm. The resource will provision and configure the
11+
Access Services Service Application.
12+
13+
The default value for the Ensure parameter is Present. When not specifying this
14+
parameter, the service application is provisioned.
15+
16+
.PARAMETER Name
17+
Key - string
18+
The name of the service application
19+
20+
.PARAMETER ApplicationPool
21+
Required - string
22+
The name of the application pool to run the service app in
23+
24+
.PARAMETER DatabaseServer
25+
Required - string
26+
The name of the database server to host Access Services databases
27+
28+
.PARAMETER Ensure
29+
Write - string
30+
Allowed values: Present, Absent
31+
Present ensures service app exists, absent ensures it is removed
32+
33+
.PARAMETER InstallAccount
34+
Write - String
35+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
36+
37+
38+
.EXAMPLE
39+
This example shows how to deploy Access Services 2013 to the local SharePoint farm.
40+
41+
42+
Configuration Example
43+
{
44+
param(
45+
[Parameter(Mandatory = $true)]
46+
[PSCredential]
47+
$SetupAccount
48+
)
49+
Import-DscResource -ModuleName SharePointDsc
50+
51+
node localhost {
52+
SPAccessServiceApp AccessServices
53+
{
54+
Name = "Access Services Service Application"
55+
ApplicationPool = "SharePoint Service Applications"
56+
DatabaseServer = "SQL.contoso.local\SQLINSTANCE"
57+
PsDscRunAsCredential = $SetupAccount
58+
}
59+
}
60+
}
61+
62+
63+
.EXAMPLE
64+
65+
This example shows how to remove a specific Access Services 2013 from the local
66+
SharePoint farm. Because Application pool and database server are both required
67+
parameters, but are not acutally needed to remove the app, any text value can
68+
be supplied for these as they will be ignored.
69+
70+
71+
Configuration Example
72+
{
73+
param(
74+
[Parameter(Mandatory = $true)]
75+
[PSCredential]
76+
$SetupAccount
77+
)
78+
Import-DscResource -ModuleName SharePointDsc
79+
80+
node localhost {
81+
SPAccessServiceApp AccessServices
82+
{
83+
Name = "Access Services Service Application"
84+
ApplicationPool = "n/a"
85+
DatabaseServer = "n/a"
86+
Ensure = "Absent"
87+
PsDscRunAsCredential = $SetupAccount
88+
}
89+
}
90+
}
91+
92+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.NAME
2+
SPAccessServices2010
3+
4+
# Description
5+
6+
**Type:** Distributed
7+
**Requires CredSSP:** No
8+
9+
This resource is responsible for creating Access Services 2010 Application
10+
instances within the local SharePoint farm. The resource will provision and
11+
configure the Access Services 2010 Service Application.
12+
13+
The default value for the Ensure parameter is Present. When not specifying this
14+
parameter, the service application is provisioned.
15+
16+
.PARAMETER Name
17+
Key - String
18+
The name of the service application
19+
20+
.PARAMETER ApplicationPool
21+
Required - String
22+
The name of the application pool to run the service app in
23+
24+
.PARAMETER Ensure
25+
Write - String
26+
Allowed values: Present, Absent
27+
Present ensures service app exists, absent ensures it is removed
28+
29+
.PARAMETER InstallAccount
30+
Write - String
31+
POWERSHELL 4 ONLY: The account to run thsi resource as, use PsDscRunAsCredential if using PowerShell 5
32+
33+
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
.NAME
2+
SPAlternateUrl
3+
4+
# Description
5+
6+
**Type:** Distributed
7+
**Requires CredSSP:** No
8+
9+
This resource is used to define an alternate access mapping URL for a specified
10+
web application. These can be assigned to specific zones for each web
11+
application. Alternatively a URL can be removed from a zone to ensure that it
12+
will remain empty and have no alternate URL.
13+
14+
The default value for the Ensure parameter is Present. When not specifying this
15+
parameter, the setting is configured.
16+
17+
## Central Administration
18+
19+
To select the Central Administration site, use the following command to retrieve
20+
the correct web application name:
21+
(Get-SPWebApplication -IncludeCentralAdministration | Where-Object {
22+
$_.IsAdministrationWebApplication
23+
}).DisplayName
24+
25+
To update the existing Default Zone AAM for Central Administration (e.g. to
26+
implement HTTPS), use the above command to retrieve the web application name
27+
(by default, it will be "SharePoint Central Administration v4") and specify
28+
"Default" as the Zone. If you wish to add AAM's instead, you may use the other
29+
zones to do so.
30+
31+
Using SPAlternateUrl to update the Default Zone AAM for Central Administration
32+
will update the AAM in SharePoint as well as the CentralAdministrationUrl value
33+
in the registry. It will not, however, update bindings in IIS. It is recommended
34+
to use the xWebsite resource from the xWebAdministration module to configure the
35+
appropriate bindings in IIS.
36+
37+
.PARAMETER WebAppName
38+
Key - String
39+
The name of the web application to apply the alternate URL to
40+
41+
.PARAMETER Zone
42+
Key - String
43+
Allowed values: Default, Intranet, Extranet, Custom, Internet
44+
The Zone to use for the alternate URL
45+
46+
.PARAMETER Url
47+
Key - String
48+
The new alternate URL
49+
50+
.PARAMETER Internal
51+
Write - Boolean
52+
Specifies if the URL has to be configured as internal
53+
54+
.PARAMETER Ensure
55+
Write - string
56+
Allowed values: Present, Absent
57+
Present ensures the URL is set for this zone on this web app, Absent ensures it is removed
58+
59+
.PARAMETER InstallAccount
60+
Write - String
61+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
62+
63+
64+
.EXAMPLE
65+
This example shows how to add a new alternate URL to a specific web application
66+
67+
68+
Configuration Example
69+
{
70+
param(
71+
[Parameter(Mandatory = $true)]
72+
[PSCredential]
73+
$SetupAccount
74+
)
75+
Import-DscResource -ModuleName SharePointDsc
76+
77+
node localhost {
78+
SPAlternateUrl CentralAdminAAM
79+
{
80+
WebAppName = "SharePoint - www.domain.com80"
81+
Zone = "Intranet"
82+
Url = "https://admin.sharepoint.contoso.com"
83+
Internal = $false
84+
Ensure = "Present"
85+
PsDscRunAsCredential = $SetupAccount
86+
}
87+
}
88+
}
89+
90+
91+
.EXAMPLE
92+
This example shows how to remove an alternate URL from a specified zone for a specific
93+
web application.
94+
95+
96+
Configuration Example
97+
{
98+
param(
99+
[Parameter(Mandatory = $true)]
100+
[PSCredential]
101+
$SetupAccount
102+
)
103+
Import-DscResource -ModuleName SharePointDsc
104+
105+
node localhost {
106+
SPAlternateUrl CentralAdminAAM
107+
{
108+
WebAppName = "SharePoint - www.domain.com80"
109+
Zone = "Intranet"
110+
Url = "http://www.externaldomain.com"
111+
Internal = $false
112+
Ensure = "Absent"
113+
PsDscRunAsCredential = $SetupAccount
114+
}
115+
}
116+
}
117+
118+
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.NAME
2+
SPAntivirusSettings
3+
4+
# Description
5+
6+
**Type:** Distributed
7+
**Requires CredSSP:** No
8+
9+
This resource is used to set the global antivirus settings for the local farm.
10+
These settings will be used to control the behavior of an external anti-virus
11+
scanning tool that is able to integrate with SharePoint. Note that this will
12+
not scan documents for viruses on it's own, an external tool still needs to be
13+
installed on the servers that integrates with SharePoint.
14+
15+
.PARAMETER IsSingleInstance
16+
Key - String
17+
Allowed values: Yes
18+
Specifies the resource is a single instance, the value must be 'Yes'
19+
20+
.PARAMETER ScanOnDownload
21+
Write - Boolean
22+
Should documents be scanned before being downloaded
23+
24+
.PARAMETER ScanOnUpload
25+
Write - Boolean
26+
Should documents be scanned on upload
27+
28+
.PARAMETER AllowDownloadInfected
29+
Write - Boolean
30+
Should documents that are infected be allowed to be downloaded
31+
32+
.PARAMETER AttemptToClean
33+
Write - Boolean
34+
Should infected documents be handed to the AV engine to attempt cleaning
35+
36+
.PARAMETER TimeoutDuration
37+
Write - Uint16
38+
What is the timeout for an AV scan in seconds
39+
40+
.PARAMETER NumberOfThreads
41+
Write - Uint16
42+
How many concurrent threads should the AV engine be able to run on a server
43+
44+
.PARAMETER InstallAccount
45+
Write - String
46+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
47+
48+
49+
.EXAMPLE
50+
This example shows how to apply specific anti-virus configuration to the farm
51+
52+
53+
Configuration Example
54+
{
55+
param(
56+
[Parameter(Mandatory = $true)]
57+
[PSCredential]
58+
$SetupAccount
59+
)
60+
Import-DscResource -ModuleName SharePointDsc
61+
62+
node localhost {
63+
SPAntivirusSettings AVSettings
64+
{
65+
IsSingleInstance = "Yes"
66+
ScanOnDownload = $true
67+
ScanOnUpload = $true
68+
AllowDownloadInfected = $false
69+
AttemptToClean = $false
70+
}
71+
}
72+
}
73+
74+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.NAME
2+
SPAppCatalog
3+
4+
# Description
5+
6+
**Type:** Distributed
7+
**Requires CredSSP:** Yes
8+
9+
This resource will ensure that a specific site collection is marked as the app
10+
catalog for the web application that the site is in. The catalog site needs to
11+
have been created using the correct template (APPCATALOG#0).
12+
13+
This resource should NOT be run using the farm account. The resource will
14+
retrieve the farm credentials from SharePoint and use that to update the
15+
AppCatalog. This does mean it requires CredSSP to be setup!
16+
17+
.PARAMETER SiteUrl
18+
Key - string
19+
The URL of the site collection that will be the app catalog for the web app that it is in
20+
21+
.PARAMETER InstallAccount
22+
Write - String
23+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
24+
25+
26+
.EXAMPLE
27+
This example shows how to configure the AppCatalog in the farm
28+
29+
30+
Configuration Example
31+
{
32+
param(
33+
[Parameter(Mandatory = $true)]
34+
[PSCredential]
35+
$SetupAccount
36+
)
37+
Import-DscResource -ModuleName SharePointDsc
38+
39+
node localhost {
40+
SPAppCatalog MainAppCatalog
41+
{
42+
SiteUrl = "https://content.sharepoint.contoso.com/sites/AppCatalog"
43+
PsDscRunAsCredential = $SetupAccount
44+
}
45+
}
46+
}
47+
48+

0 commit comments

Comments
 (0)