From 14423f8eecbf11ef869cd102b74a432a2d073f39 Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Sat, 30 Jan 2016 19:01:06 +1100 Subject: [PATCH 1/6] Fixed issue with minrole in join farm --- .../DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 b/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 index bde31be48..87444040f 100644 --- a/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 +++ b/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 @@ -76,8 +76,13 @@ function Set-TargetResource Write-Verbose -Message "Detected Version: SharePoint 2013" } 16 { - Write-Verbose -Message "Detected Version: SharePoint 2016" - $joinFarmArgs.Add("LocalServerRole", "Custom") + if ($params.ContainsKey("ServerRole") -eq $true) { + Write-Verbose -Message "Detected Version: SharePoint 2016 - configuring server as $($params.ServerRole)" + $newFarmArgs.Add("LocalServerRole", $params.ServerRole) + } else { + Write-Verbose -Message "Detected Version: SharePoint 2016 - no server role provided, configuring server without a specific role" + $newFarmArgs.Add("ServerRoleOptional", $true) + } } Default { throw [Exception] "An unknown version of SharePoint (Major version $_) was detected. Only versions 15 (SharePoint 2013) or 16 (SharePoint 2016) are supported." From 23bfe387f690b8a02afa9a54d97c2d79195be60d Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Sat, 30 Jan 2016 19:02:36 +1100 Subject: [PATCH 2/6] Prepare for v0.10 release --- Modules/xSharePoint/xSharePoint.psd1 | 2 +- README.md | 3 ++- appveyor.yml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Modules/xSharePoint/xSharePoint.psd1 b/Modules/xSharePoint/xSharePoint.psd1 index c891e5e64..8a6a441af 100644 --- a/Modules/xSharePoint/xSharePoint.psd1 +++ b/Modules/xSharePoint/xSharePoint.psd1 @@ -12,7 +12,7 @@ # RootModule = '' # Version number of this module. -ModuleVersion = '0.9.0.0' +ModuleVersion = '0.10.0.0' # ID used to uniquely identify this module GUID = '6c1176a0-4fac-4134-8ca2-3fa8a21a7b90' diff --git a/README.md b/README.md index 2aad957e6..3d065fa48 100644 --- a/README.md +++ b/README.md @@ -92,9 +92,10 @@ Additional detailed documentation is included on the wiki on GitHub. ## Version History -### Unreleased +### 0.10.0.0 * Added xSPWordAutomationServiceApp, xSPHealthAnalyzerRuleState, xSPUserProfileProperty, xSPWorkManagementApp, xSPUserProfileSyncConnection and xSPShellAdmin resources + * Fixed issue with MinRole support in xSPJoinFarm ### 0.9.0.0 diff --git a/appveyor.yml b/appveyor.yml index b9a629f95..34b0ee083 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.9.{build}.0 +version: 0.10.{build}.0 install: - cinst -y pester @@ -27,7 +27,7 @@ after_test: Remove-Item (Join-Path "$env:APPVEYOR_BUILD_FOLDER\modules\xSharePoint" "xSharePoint.pssproj") $manifest = Join-Path "$env:APPVEYOR_BUILD_FOLDER\modules\xSharePoint" "xSharePoint.psd1" - (Get-Content $manifest -Raw).Replace("0.9.0.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest + (Get-Content $manifest -Raw).Replace("0.10.0.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest Add-Type -assemblyname System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::CreateFromDirectory("$env:APPVEYOR_BUILD_FOLDER\modules\xSharePoint", "$env:APPVEYOR_BUILD_FOLDER\xSharePoint.zip") Get-ChildItem "$env:APPVEYOR_BUILD_FOLDER\xSharePoint.zip" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } From 94a175910a2c8f8785224a31647862a4972cac2c Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Sat, 30 Jan 2016 19:49:30 +1100 Subject: [PATCH 3/6] Fixed typoe in change to right variable name --- .../DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 | 4 ++-- Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 b/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 index 87444040f..43f27dad5 100644 --- a/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 +++ b/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 @@ -78,10 +78,10 @@ function Set-TargetResource 16 { if ($params.ContainsKey("ServerRole") -eq $true) { Write-Verbose -Message "Detected Version: SharePoint 2016 - configuring server as $($params.ServerRole)" - $newFarmArgs.Add("LocalServerRole", $params.ServerRole) + $joinFarmArgs.Add("LocalServerRole", $params.ServerRole) } else { Write-Verbose -Message "Detected Version: SharePoint 2016 - no server role provided, configuring server without a specific role" - $newFarmArgs.Add("ServerRoleOptional", $true) + $joinFarmArgs.Add("ServerRoleOptional", $true) } } Default { diff --git a/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 b/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 index 81e26a8bf..8932c2508 100644 --- a/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 +++ b/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 @@ -61,7 +61,7 @@ Describe "xSPJoinFarm" { Assert-MockCalled Connect-SPConfigurationDatabase } 16 { - Assert-MockCalled Connect-SPConfigurationDatabase -ParameterFilter { $LocalServerRole -ne $null } + Assert-MockCalled Connect-SPConfigurationDatabase -ParameterFilter { $ServerRoleOptional -eq $true } } Default { throw [Exception] "A supported version of SharePoint was not used in testing" From d19387b3068c9829ce6c2f9adfe8e0fef75c8698 Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Sat, 30 Jan 2016 19:57:52 +1100 Subject: [PATCH 4/6] Removed redundant serverroleoptional parameter --- .../DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 | 1 - 1 file changed, 1 deletion(-) diff --git a/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 b/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 index 43f27dad5..1d6f2dfd8 100644 --- a/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 +++ b/Modules/xSharePoint/DSCResources/MSFT_xSPJoinFarm/MSFT_xSPJoinFarm.psm1 @@ -81,7 +81,6 @@ function Set-TargetResource $joinFarmArgs.Add("LocalServerRole", $params.ServerRole) } else { Write-Verbose -Message "Detected Version: SharePoint 2016 - no server role provided, configuring server without a specific role" - $joinFarmArgs.Add("ServerRoleOptional", $true) } } Default { From fd83855103e2c253532d6110f2e57056e08693a3 Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Sat, 30 Jan 2016 20:03:46 +1100 Subject: [PATCH 5/6] Fixed test to remove redundant parameter --- Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 b/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 index 8932c2508..53002ab25 100644 --- a/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 +++ b/Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1 @@ -61,7 +61,7 @@ Describe "xSPJoinFarm" { Assert-MockCalled Connect-SPConfigurationDatabase } 16 { - Assert-MockCalled Connect-SPConfigurationDatabase -ParameterFilter { $ServerRoleOptional -eq $true } + Assert-MockCalled Connect-SPConfigurationDatabase } Default { throw [Exception] "A supported version of SharePoint was not used in testing" From cf658f729fabb3ecc6abca417fe6a2dcaf82305e Mon Sep 17 00:00:00 2001 From: Brian Farnhill Date: Sat, 30 Jan 2016 20:12:45 +1100 Subject: [PATCH 6/6] Rearranged to line up with structure for help generation --- .../MSFT_xSPShellAdmins.schema.mof | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Modules/xSharePoint/DSCResources/MSFT_xSPShellAdmins/MSFT_xSPShellAdmins.schema.mof b/Modules/xSharePoint/DSCResources/MSFT_xSPShellAdmins/MSFT_xSPShellAdmins.schema.mof index abfda3562..5964bf97d 100644 --- a/Modules/xSharePoint/DSCResources/MSFT_xSPShellAdmins/MSFT_xSPShellAdmins.schema.mof +++ b/Modules/xSharePoint/DSCResources/MSFT_xSPShellAdmins/MSFT_xSPShellAdmins.schema.mof @@ -1,3 +1,11 @@ +[ClassVersion("1.0.0")] +Class MSFT_xSPContentDatabasePermissions +{ + [Key, Description("Name of the Content Database")] String Name; + [Write, Description("Exact list of accounts that will have to get Shell Admin permissions")] String Members[]; + [Write, Description("List of all accounts that must be in the Shell Admins group")] String MembersToInclude[]; + [Write, Description("List of all accounts that are not allowed to have Shell Admin permissions")] String MembersToExclude[]; +}; /* **Description** @@ -43,16 +51,6 @@ Workaround: Change database owner in SQL Server. } */ - -[ClassVersion("1.0.0")] -Class MSFT_xSPContentDatabasePermissions -{ - [Key, Description("Name of the Content Database")] String Name; - [Write, Description("Exact list of accounts that will have to get Shell Admin permissions")] String Members[]; - [Write, Description("List of all accounts that must be in the Shell Admins group")] String MembersToInclude[]; - [Write, Description("List of all accounts that are not allowed to have Shell Admin permissions")] String MembersToExclude[]; -}; - [ClassVersion("1.0.0.0"), FriendlyName("xSPShellAdmins")] class MSFT_xSPShellAdmins : OMI_BaseResource {