Skip to content

Commit af5f29b

Browse files
authored
Merge pull request #989 from PowerShell/release-3.1
Release v3.1
2 parents 63efb9c + 49ed159 commit af5f29b

33 files changed

+1241
-442
lines changed

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Change log for SharePointDsc
22

3+
## v3.1
4+
5+
* Changes to SharePointDsc
6+
* Updated LICENSE file to match the Microsoft Open Source Team standard.
7+
* ProjectServerConnector
8+
* Added a file hash validation check to prevent the ability to load custom code
9+
into the module.
10+
* SPFarm
11+
* Fixed localization issue where TypeName was in the local language.
12+
* SPInstallPrereqs
13+
* Updated links in the Readme.md file to docs.microsoft.com.
14+
* Fixed required prereqs for SharePoint 2019, added MSVCRT11.
15+
* SPManagedMetadataServiceApp
16+
* Fixed issue where Get-TargetResource method throws an error when the
17+
service app proxy does not exist.
18+
* SPSearchContentSource
19+
* Corrected issue where the New-SPEnterpriseSearchCrawlContentSource cmdlet
20+
was called twice.
21+
* SPSearchServiceApp
22+
* Fixed issue where Get-TargetResource method throws an error when the
23+
service application pool does not exist.
24+
* Implemented check to make sure cmdlets are only executed when it actually
25+
has something to update.
26+
* Deprecated WindowsServiceAccount parameter and moved functionality to
27+
new resource (SPSearchServiceSettings).
28+
* SPSearchServiceSettings
29+
* Added new resource to configure search service settings.
30+
* SPServiceAppSecurity
31+
* Fixed unavailable utility method (ExpandAccessLevel).
32+
* Updated the schema to no longer specify username as key for the sub class.
33+
* SPUserProfileServiceApp
34+
* Fixed issue where localized versions of Windows and SharePoint would throw
35+
an error.
36+
* SPUserProfileSyncConnection
37+
* Corrected implementation of Ensure parameter.
38+
339
## v3.0
440

541
* Changes to SharePointDsc

LICENSE

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
The MIT License (MIT)
1+
MIT License
22

3-
Copyright (c) 2015 Microsoft
3+
Copyright (c) Microsoft Corporation. All rights reserved.
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
2214

15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

Modules/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,16 @@ function Get-TargetResource
174174
}
175175

176176
$centralAdminProvisioned = $false
177-
$ca = Get-SPServiceInstance -Server $env:ComputerName `
178-
| Where-Object -Filterscript {
179-
$_.TypeName -eq "Central Administration" -and $_.Status -eq "Online"
180-
}
177+
$ca = Get-SPServiceInstance -Server $env:ComputerName
178+
if ($null -ne $ca)
179+
{
180+
$ca = $ca | Where-Object -Filterscript {
181+
$_.GetType().Name -eq "SPWebServiceInstance" -and `
182+
$_.Name -eq "WSS_Administration" -and `
183+
$_.Status -eq "Online"
184+
}
185+
}
186+
181187
if ($null -ne $ca)
182188
{
183189
$centralAdminProvisioned = $true
@@ -376,19 +382,22 @@ function Set-TargetResource
376382
# Provision central administration
377383
if ($params.RunCentralAdmin -eq $true)
378384
{
379-
$serviceInstance = Get-SPServiceInstance -Server $env:COMPUTERNAME `
380-
| Where-Object -FilterScript {
381-
$_.TypeName -eq "Central Administration"
382-
}
385+
$serviceInstance = Get-SPServiceInstance -Server $env:COMPUTERNAME
383386
if ($null -eq $serviceInstance)
384387
{
385388
$domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain
386389
$fqdn = "$($env:COMPUTERNAME).$domain"
387390
$serviceInstance = Get-SPServiceInstance -Server $fqdn `
388-
| Where-Object -FilterScript {
389-
$_.TypeName -eq "Central Administration"
390-
}
391391
}
392+
393+
if ($null -ne $serviceInstance)
394+
{
395+
$serviceInstance = $serviceInstance | Where-Object -FilterScript {
396+
$_.GetType().Name -eq "SPWebServiceInstance" -and `
397+
$_.Name -eq "WSS_Administration"
398+
}
399+
}
400+
392401
if ($null -eq $serviceInstance)
393402
{
394403
throw [Exception] "Unable to locate Central Admin service instance on this server"
@@ -398,19 +407,22 @@ function Set-TargetResource
398407
else
399408
{
400409
# Unprovision central administration
401-
$serviceInstance = Get-SPServiceInstance -Server $env:COMPUTERNAME `
402-
| Where-Object -FilterScript {
403-
$_.TypeName -eq "Central Administration"
404-
}
410+
$serviceInstance = Get-SPServiceInstance -Server $env:COMPUTERNAME
405411
if ($null -eq $serviceInstance)
406412
{
407413
$domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain
408414
$fqdn = "$($env:COMPUTERNAME).$domain"
409-
$serviceInstance = Get-SPServiceInstance -Server $fqdn `
410-
| Where-Object -FilterScript {
411-
$_.TypeName -eq "Central Administration"
412-
}
415+
$serviceInstance = Get-SPServiceInstance -Server $fqdn
413416
}
417+
418+
if ($null -ne $serviceInstance)
419+
{
420+
$serviceInstance = $serviceInstance | Where-Object -FilterScript {
421+
$_.GetType().Name -eq "SPWebServiceInstance" -and `
422+
$_.Name -eq "WSS_Administration"
423+
}
424+
}
425+
414426
if ($null -eq $serviceInstance)
415427
{
416428
throw "Unable to locate Central Admin service instance on this server"
@@ -644,19 +656,22 @@ function Set-TargetResource
644656
}
645657
else
646658
{
647-
$serviceInstance = Get-SPServiceInstance -Server $env:COMPUTERNAME `
648-
| Where-Object -FilterScript {
649-
$_.TypeName -eq "Central Administration"
650-
}
659+
$serviceInstance = Get-SPServiceInstance -Server $env:COMPUTERNAME
651660
if ($null -eq $serviceInstance)
652661
{
653662
$domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain
654663
$fqdn = "$($env:COMPUTERNAME).$domain"
655-
$serviceInstance = Get-SPServiceInstance -Server $fqdn `
656-
| Where-Object -FilterScript {
657-
$_.TypeName -eq "Central Administration"
658-
}
664+
$serviceInstance = Get-SPServiceInstance -Server $fqdn
659665
}
666+
667+
if ($null -ne $serviceInstance)
668+
{
669+
$serviceInstance = $serviceInstance | Where-Object -FilterScript {
670+
$_.GetType().Name -eq "SPWebServiceInstance" -and `
671+
$_.Name -eq "WSS_Administration"
672+
}
673+
}
674+
660675
if ($null -eq $serviceInstance)
661676
{
662677
throw [Exception] "Unable to locate Central Admin service instance on this server"

Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ function Set-TargetResource
608608
{
609609
Write-Verbose -Message "Version: SharePoint 2019"
610610
$requiredParams = @("SQLNCli","Sync","AppFabric","IDFX11","MSIPCClient","KB3092423",
611-
"WCFDataServices56","DotNet472","MSVCRT141")
611+
"WCFDataServices56","DotNet472","MSVCRT11","MSVCRT141")
612612

613613
if ($osVersion.Major -eq 11)
614614
{

Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ then execute the installation from there.
4242
The SharePoint prerequisites can be downloaded from the following locations:
4343

4444
SharePoint 2013:
45-
https://technet.microsoft.com/library/a88d3f72-7ac3-4f08-b302-c4ca0a796268%28v=office.16%29.aspx?#section5
45+
https://docs.microsoft.com/en-us/SharePoint/install/hardware-and-software-requirements-0#section5
4646

4747
SharePoint 2016:
48-
https://technet.microsoft.com/en-us/library/cc262485(v=office.16).aspx#section5
48+
https://docs.microsoft.com/en-us/SharePoint/install/hardware-and-software-requirements#section5
4949

5050
SharePoint 2019:
51+
https://docs.microsoft.com/en-us/sharepoint/install/hardware-and-software-requirements-2019#links-to-applicable-software

Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ function Get-TargetResource
104104
}
105105
}
106106

107-
$proxy = Get-SPMetadataServiceApplicationProxy -Identity $proxyName
107+
$proxy = Get-SPMetadataServiceApplicationProxy -Identity $proxyName `
108+
-ErrorAction SilentlyContinue
108109
if ($null -ne $proxy)
109110
{
110111
$contentTypePushDownEnabled = $proxy.Properties["IsContentTypePushdownEnabled"]

Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -427,12 +427,6 @@ function Set-TargetResource
427427
-LOBSystemSet $params.LOBSystemSet
428428
}
429429

430-
$source = New-SPEnterpriseSearchCrawlContentSource `
431-
-SearchApplication $params.ServiceAppName `
432-
-Type $newType `
433-
-Name $params.Name `
434-
-StartAddresses $startAddresses
435-
436430
if ($null -eq $source)
437431
{
438432
throw ("An error occurred during creation of the Content Source, " + `

0 commit comments

Comments
 (0)