Skip to content

Commit dfeb919

Browse files
author
Brian Farnhill
committed
Merge branch 'master' of https://github.com/PowerShell/SharePointDsc into release-1.5
2 parents 1bc98d2 + c4553e8 commit dfeb919

File tree

78 files changed

+7057
-1
lines changed

Some content is hidden

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

78 files changed

+7057
-1
lines changed

Modules/SharePointDsc/SharePointDsc.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ PrivateData = @{
113113
PSData = @{
114114

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

118118
# A URL to the license for this module.
119119
LicenseUri = 'https://github.com/PowerShell/SharePointDsc/blob/master/LICENSE'
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
.NAME
2+
SPAccessServiceApp
3+
4+
.DESCRIPTION
5+
6+
This resource is responsible for creating Access Services Application instances within the local
7+
SharePoint farm. The resource will provision and configure the Access Services Service
8+
Application.
9+
10+
.PARAMETER Name
11+
Key - string
12+
The name of the service application
13+
14+
.PARAMETER ApplicationPool
15+
Required - string
16+
The name of the application pool to run the service app in
17+
18+
.PARAMETER DatabaseServer
19+
Required - string
20+
The name of the database server to host Access Services databases
21+
22+
.PARAMETER Ensure
23+
Write - string
24+
Allowed values: Present, Absent
25+
Present ensures service app exists, absent ensures it is removed
26+
27+
.PARAMETER InstallAccount
28+
Write - String
29+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
30+
31+
32+
.EXAMPLE
33+
This example shows how to deploy Access Services 2013 to the local SharePoint farm.
34+
35+
36+
Configuration Example
37+
{
38+
param(
39+
[Parameter(Mandatory = $true)]
40+
[PSCredential]
41+
$SetupAccount
42+
)
43+
Import-DscResource -ModuleName SharePointDsc
44+
45+
node localhost {
46+
SPAccessServiceApp AccessServices
47+
{
48+
Name = "Access Services Service Application"
49+
ApplicationPool = "SharePoint Service Applications"
50+
DatabaseServer = "SQL.contoso.local\SQLINSTANCE"
51+
PsDscRunAsCredential = $SetupAccount
52+
}
53+
}
54+
}
55+
56+
57+
.EXAMPLE
58+
59+
This example shows how to remove a specific Access Services 2013 from the local
60+
SharePoint farm. Because Application pool and database server are both required
61+
parameters, but are not acutally needed to remove the app, any text value can
62+
be supplied for these as they will be ignored.
63+
64+
65+
Configuration Example
66+
{
67+
param(
68+
[Parameter(Mandatory = $true)]
69+
[PSCredential]
70+
$SetupAccount
71+
)
72+
Import-DscResource -ModuleName SharePointDsc
73+
74+
node localhost {
75+
SPAccessServiceApp AccessServices
76+
{
77+
Name = "Access Services Service Application"
78+
ApplicationPool = "n/a"
79+
DatabaseServer = "n/a"
80+
Ensure = "Absent"
81+
PsDscRunAsCredential = $SetupAccount
82+
}
83+
}
84+
}
85+
86+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.NAME
2+
SPAlternateUrl
3+
4+
.DESCRIPTION
5+
6+
This resource is used to define an alternate access mapping URL for a specified web application.
7+
These can be assigned to specific zones for each web application. Alternatively a URL can be
8+
removed from a zone to ensure that it will remain empty and have no alternate URL.
9+
10+
.PARAMETER WebAppUrl
11+
Key - String
12+
The URL of the web application to apply the alternate URL to
13+
14+
.PARAMETER Zone
15+
Key - String
16+
Allowed values: Default, Intranet, Extranet, Custom, Internet
17+
The Zone to use for the alternate URL
18+
19+
.PARAMETER Url
20+
Write - String
21+
The new alternate URL
22+
23+
.PARAMETER Ensure
24+
Write - string
25+
Allowed values: Present, Absent
26+
Present ensures the URL is set for this zone on this web app, Absent ensures it is removed
27+
28+
.PARAMETER InstallAccount
29+
Write - String
30+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
31+
32+
33+
.EXAMPLE
34+
This example shows how to add a new alternate URL to a specific web application
35+
36+
37+
Configuration Example
38+
{
39+
param(
40+
[Parameter(Mandatory = $true)]
41+
[PSCredential]
42+
$SetupAccount
43+
)
44+
Import-DscResource -ModuleName SharePointDsc
45+
46+
node localhost {
47+
SPAlternateUrl CentralAdminAAM
48+
{
49+
WebAppUrl = "http://sharepoint1:9999"
50+
Zone = "Intranet"
51+
Url = "https://admin.sharepoint.contoso.com"
52+
PsDscRunAsCredential = $SetupAccount
53+
}
54+
}
55+
}
56+
57+
58+
.EXAMPLE
59+
This example shows how to remove an alternate URL from a specified zone for a specific
60+
web application.
61+
62+
63+
Configuration Example
64+
{
65+
param(
66+
[Parameter(Mandatory = $true)]
67+
[PSCredential]
68+
$SetupAccount
69+
)
70+
Import-DscResource -ModuleName SharePointDsc
71+
72+
node localhost {
73+
SPAlternateUrl CentralAdminAAM
74+
{
75+
WebAppUrl = "http://sharepoint1:9999"
76+
Zone = "Intranet"
77+
Ensure = "Absent"
78+
PsDscRunAsCredential = $SetupAccount
79+
}
80+
}
81+
}
82+
83+
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.NAME
2+
SPAntivirusSettings
3+
4+
.DESCRIPTION
5+
6+
This resource is used to set the global antivirus settings for the local farm. These settings
7+
will be used to control the behavior of an external anti-virus scanning tool that is able to
8+
integrate with SharePoint. Note that this will not scan documents for viruses on it's own, an
9+
external tool still needs to be installed on the servers that integrates with SharePoint.
10+
11+
.PARAMETER ScanOnDownload
12+
Key - Boolean
13+
Should documents be scanned before being downloaded
14+
15+
.PARAMETER ScanOnUpload
16+
Write - Boolean
17+
Should documents be scanned on upload
18+
19+
.PARAMETER AllowDownloadInfected
20+
Write - Boolean
21+
Should documents that are infected be allowed to be downloaded
22+
23+
.PARAMETER AttemptToClean
24+
Write - Boolean
25+
Should infected documents be handed to the AV engine to attempt cleaning
26+
27+
.PARAMETER TimeoutDuration
28+
Write - Uint16
29+
What is the timeout for an AV scan in seconds
30+
31+
.PARAMETER NumberOfThreads
32+
Write - Uint16
33+
How many concurrent threads should the AV engine be able to run on a server
34+
35+
.PARAMETER InstallAccount
36+
Write - String
37+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
38+
39+
40+
.EXAMPLE
41+
This example shows how to apply specific anti-virus configuration to the farm
42+
43+
44+
Configuration Example
45+
{
46+
param(
47+
[Parameter(Mandatory = $true)]
48+
[PSCredential]
49+
$SetupAccount
50+
)
51+
Import-DscResource -ModuleName SharePointDsc
52+
53+
node localhost {
54+
SPAntivirusSettings AVSettings
55+
{
56+
ScanOnDownload = $true
57+
ScanOnUpload = $true
58+
AllowDownloadInfected = $false
59+
AttemptToClean = $false
60+
}
61+
}
62+
}
63+
64+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.NAME
2+
SPAppCatalog
3+
4+
.DESCRIPTION
5+
6+
This resource will ensure that a specific site collection is marked as the app catalog for
7+
the web application that the site is in. The catalog site needs to have been created using
8+
the correct template (APPCATALOG#0).
9+
10+
.PARAMETER SiteUrl
11+
Key - string
12+
The URL of the site collection that will be the app catalog for the web app that it is in
13+
14+
.PARAMETER InstallAccount
15+
Write - String
16+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
17+
18+
19+
.EXAMPLE
20+
This example shows how to configure the AppCatalog in the farm
21+
22+
23+
Configuration Example
24+
{
25+
param(
26+
[Parameter(Mandatory = $true)]
27+
[PSCredential]
28+
$SetupAccount
29+
)
30+
Import-DscResource -ModuleName SharePointDsc
31+
32+
node localhost {
33+
SPAppCatalog MainAppCatalog
34+
{
35+
SiteUrl = "https://content.sharepoint.contoso.com/sites/AppCatalog"
36+
PsDscRunAsCredential = $SetupAccount
37+
}
38+
}
39+
}
40+
41+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.NAME
2+
SPAppDomain
3+
4+
.DESCRIPTION
5+
6+
This resource will set the value for the app domain settings at the farm level. You can set the
7+
domain name and the prefix that is to be used for app URLs.
8+
9+
.PARAMETER AppDomain
10+
Key - string
11+
The domain name for apps to use in this farm
12+
13+
.PARAMETER Prefix
14+
Required - string
15+
The prefix to go on to app URLs
16+
17+
.PARAMETER InstallAccount
18+
Write - String
19+
POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5
20+
21+
22+
.EXAMPLE
23+
This example shows how to apply app URLs to the current farm.
24+
25+
26+
Configuration Example
27+
{
28+
param(
29+
[Parameter(Mandatory = $true)]
30+
[PSCredential]
31+
$SetupAccount
32+
)
33+
Import-DscResource -ModuleName SharePointDsc
34+
35+
node localhost {
36+
SPAppDomain LocalFarmAppUrls
37+
{
38+
AppDomain = "contosointranetapps.com"
39+
Prefix = "app"
40+
PsDscRunAsCredential = $SetupAccount
41+
}
42+
}
43+
}
44+
45+

0 commit comments

Comments
 (0)