Skip to content

Commit

Permalink
Merge pull request #165 from BrianFarnhill/bug-minrolejoinfarm
Browse files Browse the repository at this point in the history
Bug fix for MinRole support in xSPJoinFarm
  • Loading branch information
BrianFarnhill committed Jan 30, 2016
2 parents de7fa0b + cf658f7 commit e4977d6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ 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)"
$joinFarmArgs.Add("LocalServerRole", $params.ServerRole)
} else {
Write-Verbose -Message "Detected Version: SharePoint 2016 - no server role provided, configuring server without a specific role"
}
}
Default {
throw [Exception] "An unknown version of SharePoint (Major version $_) was detected. Only versions 15 (SharePoint 2013) or 16 (SharePoint 2016) are supported."
Expand Down
Original file line number Diff line number Diff line change
@@ -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**

Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion Modules/xSharePoint/xSharePoint.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Tests/xSharePoint/xSharePoint.xSPJoinFarm.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Describe "xSPJoinFarm" {
Assert-MockCalled Connect-SPConfigurationDatabase
}
16 {
Assert-MockCalled Connect-SPConfigurationDatabase -ParameterFilter { $LocalServerRole -ne $null }
Assert-MockCalled Connect-SPConfigurationDatabase
}
Default {
throw [Exception] "A supported version of SharePoint was not used in testing"
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.9.{build}.0
version: 0.10.{build}.0

install:
- cinst -y pester
Expand Down Expand Up @@ -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 }
Expand Down

0 comments on commit e4977d6

Please sign in to comment.