From 1e1d0d452874159fd3a3e8804ffd2f18d13eea4f Mon Sep 17 00:00:00 2001 From: lazdalt Date: Fri, 2 Feb 2018 13:10:03 +0100 Subject: [PATCH 01/56] Added SPTrustedIdentityTokenIssuerProviderRealms resource Issue #539 --- .gitignore | 1 + CHANGELOG.md | 3 +- ...stedIdentityTokenIssuerProviderRealms.psm1 | 208 +++++++++++++ ...entityTokenIssuerProviderRealms.schema.mof | 14 + .../readme.md | 12 + .../1-Example.ps1 | 28 ++ ...dentityTokenIssuerProviderRealms.Tests.ps1 | 276 ++++++++++++++++++ 7 files changed, 541 insertions(+), 1 deletion(-) create mode 100644 Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 create mode 100644 Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof create mode 100644 Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md create mode 100644 Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 create mode 100644 Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 diff --git a/.gitignore b/.gitignore index 224ea0ddf..77eb6867e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ Modules/SharePointDsc/DscResource.Tests/* node_modules node_modules/* markdownissues.txt +/package-lock.json diff --git a/CHANGELOG.md b/CHANGELOG.md index acf9c2437..94f1b352d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Change log for SharePointDsc ## Unreleased - +* SPTrustedIdentityTokenIssuerProviderRealms + * Added the resource * SPDiagnosticsProvider * Added the resource * SPFarm diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 new file mode 100644 index 000000000..54ffeb272 --- /dev/null +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -0,0 +1,208 @@ +function Get-TargetResource +{ + [CmdletBinding()] + [OutputType([System.Collections.Hashtable])] + param + ( + [parameter(Mandatory = $true)] + [string] + $IssuerName, + + [parameter(Mandatory = $true)] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + + [parameter(Mandatory = $false)] + [ValidateSet("Present","Absent")] + [String] + $Ensure = "Present", + + [parameter(Mandatory = $false)] + [System.Management.Automation.PSCredential] + $InstallAccount + ) + + Write-Verbose -Message "Getting SPTrustedIdentityTokenIssuer ProviderRealms" + + $result = Invoke-SPDSCCommand -Credential $InstallAccount ` + -Arguments $PSBoundParameters ` + -ScriptBlock { + $params = $args[0] + + $paramRealms = $params.ProviderRealms | % { "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + #$paramRealms =@{} + #foreach($cKey in $params.ProviderRealms) + #{ + # $url= New-Object System.Uri($cKey.RealmUrl) + #} + + $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` + -ErrorAction SilentlyContinue + + if (!$spTrust) + { + throw "SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found" + } + + $currentRealms =$spTrust.ProviderRealms.GetEnumerator() | %{ "$($_.Key)=$($_.Value)" } + + $diffObjects = $paramRealms | ?{$currentRealms -contains $_} + + if($params.Ensure -eq "Present") + { + $present = $($diffObjects).Count -eq $($paramRealms).Count + } + else + { + $present = !$($($diffObjects).Count -eq 0) + } + + $currentState = @{$true = "Present"; $false = "Absent"}[$present] + + return @{ + IssuerName = $params.IssuerName + ProviderRealms = $spTrust.ProviderRealms + Ensure = $currentState + } + } + return $result +} + +function Set-TargetResource +{ + [CmdletBinding()] + param + ( + [parameter(Mandatory = $true)] + [string] + $IssuerName, + + [parameter(Mandatory = $true)] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + + [parameter(Mandatory = $false)] + [ValidateSet("Present","Absent")] + [String] + $Ensure = "Present", + + [parameter(Mandatory = $false)] + [System.Management.Automation.PSCredential] + $InstallAccount + ) + + $CurrentValues = Get-TargetResource @PSBoundParameters + + if ($Ensure -eq "Present") + { + if ($CurrentValues.Ensure -eq "Absent") + { + + + Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" + + $result = Invoke-SPDSCCommand -Credential $InstallAccount ` + -Arguments $PSBoundParameters ` + -ScriptBlock { + $params = $args[0] + + $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` + -ErrorAction SilentlyContinue + + foreach($cKey in $params.ProviderRealms) + { + $url= New-Object System.Uri($cKey.RealmUrl) + if ($trust.ProviderRealms.ContainsKey($url)) + { + if($trust.ProviderRealms[$url.AbsoluteUri] -ne $cKey.RealmUrn) + { + Write-Verbose -Message "The provider realm '$($cKey.RealmUrl)' exists but has different value. Updating to '$($cKey.RealmUrn)'" + $trust.ProviderRealms.Remove($url) + $trust.ProviderRealms.Add($url, $cKey.Value) + } + else + { + Write-Verbose -Message "Provider realm '$($cKey.RealmUrl)' exists. Skipping." + } + } + else + { + Write-Verbose -Message "Adding new provider realm '$($cKey.RealmUrl)'" + $trust.ProviderRealms.Add($url, $cKey.Value) + + } + } + + $trust.Update() + } + } + } + else + { + Write-Verbose "Removing SPTrustedIdentityTokenIssuer provider realms" + $result = Invoke-SPDSCCommand -Credential $InstallAccount ` + -Arguments $PSBoundParameters ` + -ScriptBlock { + $params = $args[0] + $update = $false + $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` + -ErrorAction SilentlyContinue + + foreach($cKey in $params.ProviderRealms) + { + $url=[System.Uri]$cKey.RealmUrl + + if ($trust.ProviderRealms.ContainsKey($url)) + { + Write-Verbose -Message "Removing provider realm '$($cKey.RealmUrl)'." + $trust.ProviderRealms.Remove($url) + $update = $true + } + } + + if($update -eq $true) + { + $trust.Update() + } + else + { + throw "Provider realm '$($cKey.RealmUrl)' does not exist." + } + } + } +} + +function Test-TargetResource +{ + [CmdletBinding()] + [OutputType([Boolean])] + param + ( + [parameter(Mandatory = $true)] + [string] + $IssuerName, + + [parameter(Mandatory = $true)] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + + [parameter(Mandatory = $false)] + [ValidateSet("Present","Absent")] + [String] + $Ensure = "Present", + + [parameter(Mandatory = $false)] + [System.Management.Automation.PSCredential] + $InstallAccount + ) + + Write-Verbose -Message "Testing SPTrustedIdentityTokenIssuer provider realms" + + $CurrentValues = Get-TargetResource @PSBoundParameters + + return Test-SPDscParameterState -CurrentValues $CurrentValues ` + -DesiredValues $PSBoundParameters ` + -ValuesToCheck @("Ensure") +} + +Export-ModuleMember -Function *-TargetResource diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof new file mode 100644 index 000000000..aaad61662 --- /dev/null +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof @@ -0,0 +1,14 @@ +[ClassVersion("1.0.0.0")] +class MSFT_SPProviderRealm +{ + [Key, Description("Realm Url")] String RealmUrl; + [Required, Description("RealmUrn")] String RealmUrn; +}; +[ClassVersion("1.0.0.0"), FriendlyName("SPTrustedIdentityTokenIssuerProviderRealms")] +class MSFT_SPTrustedIdentityTokenIssuerProviderRealms : OMI_BaseResource +{ + [Key, Description("Name of the SPTrustedIdentityTokenIssuer")] String IssuerName; + [Required, EmbeddedInstance("MSFT_SPProviderRealm"), Description("Provider Realms that is passed to identity provider")] String ProviderRealms[]; + [Write, Description("Present if the ProviderRealms should be created, or Absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; + [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; +}; diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md new file mode 100644 index 000000000..8e9d622fd --- /dev/null +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -0,0 +1,12 @@ +This resource is used to add or remove provider realms to SPTrustedIdentityTokenIssuer in a +SharePoint farm. + +IssuerName is the name for SPTrustedIdentityTokenIssuer + +ProviderRealms is array of MSFT_SPProviderRealm with format + @{ + Key = "" + Value = "" + } + +The default value for the Ensure parameter is Present. \ No newline at end of file diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 new file mode 100644 index 000000000..025b1a79b --- /dev/null +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 @@ -0,0 +1,28 @@ + Configuration Example + { + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + $ProviderRealms = @() + $ProviderRealms += MSFT_SPProviderRealm { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + $ProviderRealms += MSFT_SPProviderRealm { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + SPTrustedIdentityTokenIssuerProviderRealms TeamSite + { + IssuerName = "Contoso" + ProviderRealms = $ProviderRealms + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } + } diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 new file mode 100644 index 000000000..576f86d1c --- /dev/null +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -0,0 +1,276 @@ +[CmdletBinding()] +param ( + [Parameter()] + [string]$SharePointCmdletModule = (Join-Path -Path "C:\Users\Administrator\Source\Repos\SharePointDsc\Tests\Unit\SharePointDsc" ` + -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` + -Resolve) +) + +Import-Module -Name (Join-Path -Path $PSScriptRoot ` + -ChildPath "..\UnitTestHelper.psm1" ` + -Resolve) + +$Global:SPDscHelper = New-SPDscUnitTestHelper -SharePointStubModule $SharePointCmdletModule ` + -DscResource "SPTrustedIdentityTokenIssuerProviderRealms" + +Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { + InModuleScope -ModuleName $Global:SPDscHelper.ModuleName -ScriptBlock { + Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope + + Context -Name "The SPTrustedLoginProviderRealms not exists in the farm" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $null } + + It "Should get Error message SPTrustedIdentityTokenIssuer 'Contoso' not found" { + { Get-TargetResource @testParams } | Should -Throw "SPTrustedIdentityTokenIssuer 'Contoso' not found" + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and should not be changed" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $param = @{ } + $param.ProviderRealms = $realmsDict + $realmRet = New-Object –TypeName PSObject –Prop $param + return $realmRet + } + + It "Test-TargetResource: Should return true" { + Test-TargetResource @testParams | Should Be $true + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Present" + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists but one realm will be added" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmsDict.Remove("https://intranet.contoso.com/") + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + [cmdletbinding()] + param ( + [Parameter(Mandatory = $true)] + $unexpandedValue + ) + process { } + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -PassThru + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return absent" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realm must be added to SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ) | Should Be $true + } + + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be removed" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Absent" + } + + + + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmsDict.Remove("https://intranet.contoso.com/") + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Present" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realms removed SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be updated" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmsDict["https://intranet.contoso.com/"]="urn:sharepoint:contoso:intranet1" + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realm updated in SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + } +} + +Invoke-Command -ScriptBlock $Global:SPDscHelper.CleanupScript -NoNewScope + From 7478ebce6c22bbd174342144043ad07cf12389c9 Mon Sep 17 00:00:00 2001 From: lazdalt Date: Fri, 2 Feb 2018 16:25:38 +0100 Subject: [PATCH 02/56] replaced Tabs --- ...dentityTokenIssuerProviderRealms.Tests.ps1 | 509 +++++++++--------- 1 file changed, 254 insertions(+), 255 deletions(-) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 index 576f86d1c..e48caada2 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -1,276 +1,275 @@ [CmdletBinding()] param ( - [Parameter()] - [string]$SharePointCmdletModule = (Join-Path -Path "C:\Users\Administrator\Source\Repos\SharePointDsc\Tests\Unit\SharePointDsc" ` - -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` - -Resolve) + [Parameter()] + [string]$SharePointCmdletModule = (Join-Path -Path "C:\Users\Administrator\Source\Repos\SharePointDsc\Tests\Unit\SharePointDsc" ` + -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` + -Resolve) ) Import-Module -Name (Join-Path -Path $PSScriptRoot ` - -ChildPath "..\UnitTestHelper.psm1" ` - -Resolve) + -ChildPath "..\UnitTestHelper.psm1" ` + -Resolve) $Global:SPDscHelper = New-SPDscUnitTestHelper -SharePointStubModule $SharePointCmdletModule ` - -DscResource "SPTrustedIdentityTokenIssuerProviderRealms" + -DscResource "SPTrustedIdentityTokenIssuerProviderRealms" Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { - InModuleScope -ModuleName $Global:SPDscHelper.ModuleName -ScriptBlock { - Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope - - Context -Name "The SPTrustedLoginProviderRealms not exists in the farm" -Fixture { - $testParams = @{ - IssuerName = "Contoso" - ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://search.contoso.com" - RealmUrn = "urn:sharepoint:contoso:search" - } -ClientOnly) - (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://intranet.contoso.com" - RealmUrn = "urn:sharepoint:contoso:intranet" - } -ClientOnly)) - Ensure = "Present" - } - - Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $null } - - It "Should get Error message SPTrustedIdentityTokenIssuer 'Contoso' not found" { - { Get-TargetResource @testParams } | Should -Throw "SPTrustedIdentityTokenIssuer 'Contoso' not found" - } - } - - Context -Name "The SPTrustedLoginProviderRealms already exists and should not be changed" -Fixture { - $testParams = @{ - IssuerName = "Contoso" - ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://search.contoso.com" - RealmUrn = "urn:sharepoint:contoso:search" - } -ClientOnly) - (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://intranet.contoso.com" - RealmUrn = "urn:sharepoint:contoso:intranet" - } -ClientOnly)) - Ensure = "Present" - } - - Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { - - $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' - foreach ($realm in $testParams.ProviderRealms) - { - $url = New-Object System.Uri($realm.RealmUrl) - $realmsDict[$url.ToString()] = $realm.RealmUrn - } - - $param = @{ } - $param.ProviderRealms = $realmsDict - $realmRet = New-Object –TypeName PSObject –Prop $param - return $realmRet - } + InModuleScope -ModuleName $Global:SPDscHelper.ModuleName -ScriptBlock { + Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope + + Context -Name "The SPTrustedLoginProviderRealms not exists in the farm" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $null } + + It "Should get Error message SPTrustedIdentityTokenIssuer 'Contoso' not found" { + { Get-TargetResource @testParams } | Should -Throw "SPTrustedIdentityTokenIssuer 'Contoso' not found" + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and should not be changed" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $param = @{ } + $param.ProviderRealms = $realmsDict + $realmRet = New-Object –TypeName PSObject –Prop $param + return $realmRet + } - It "Test-TargetResource: Should return true" { - Test-TargetResource @testParams | Should Be $true - } - - It "Get-TargetResource: Should return present" { - $getResults = Get-TargetResource @testParams - $getResults.Ensure | Should Be "Present" - } - } - - Context -Name "The SPTrustedLoginProviderRealms already exists but one realm will be added" -Fixture { - $testParams = @{ - IssuerName = "Contoso" - ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://search.contoso.com" - RealmUrn = "urn:sharepoint:contoso:search" - } -ClientOnly) - (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://intranet.contoso.com" - RealmUrn = "urn:sharepoint:contoso:intranet" - } -ClientOnly)) - Ensure = "Present" - } - - $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 - - $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' - foreach ($realm in $testParams.ProviderRealms) - { - $url = New-Object System.Uri($realm.RealmUrl) - $realmsDict[$url.ToString()] = $realm.RealmUrn - } - - $realmsDict.Remove("https://intranet.contoso.com/") - - $realmRet = [pscustomobject]@{ - ProviderRealms = $realmsDict - } - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - [cmdletbinding()] - param ( - [Parameter(Mandatory = $true)] - $unexpandedValue - ) - process { } - } -Force + It "Test-TargetResource: Should return true" { + Test-TargetResource @testParams | Should Be $true + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Present" + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists but one realm will be added" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmsDict.Remove("https://intranet.contoso.com/") + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + [cmdletbinding()] + param ( + [Parameter(Mandatory = $true)] + $unexpandedValue + ) + process { } + } -Force - $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount - } -PassThru - - $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount - } -Force - - Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { - return $realmRet - } - - It "Get-TargetResource: Should return absent" { - $getResults = Get-TargetResource @testParams - $getResults.Ensure | Should Be "Absent" - } - - It "Test-TargetResource: Should return false" { - Test-TargetResource @testParams | Should Be $false - } - - It "Set-TargetResource: Realm must be added to SPTrustedIdentityTokenIssuer.ProviderRealms" { - Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ) | Should Be $true - } - - } - - Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be removed" -Fixture { - $testParams = @{ - IssuerName = "Contoso" - ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://search.contoso.com" - RealmUrn = "urn:sharepoint:contoso:search" - } -ClientOnly) - (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://intranet.contoso.com" - RealmUrn = "urn:sharepoint:contoso:intranet" - } -ClientOnly)) - Ensure = "Absent" - } - + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -PassThru + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return absent" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realm must be added to SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ) | Should Be $true + } + + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be removed" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Absent" + } + - $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 - - $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' - foreach ($realm in $testParams.ProviderRealms) - { - $url = New-Object System.Uri($realm.RealmUrl) - $realmsDict[$url.ToString()] = $realm.RealmUrn - } + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } - $realmsDict.Remove("https://intranet.contoso.com/") + $realmsDict.Remove("https://intranet.contoso.com/") - $realmRet = [pscustomobject]@{ - ProviderRealms = $realmsDict - } - - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - - $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount - } -Force - - - Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { - return $realmRet - } - - It "Get-TargetResource: Should return present" { - $getResults = Get-TargetResource @testParams - $getResults.Ensure | Should Be "Present" - } - - It "Test-TargetResource: Should return false" { - Test-TargetResource @testParams | Should Be $false - } - - It "Set-TargetResource: Realms removed SPTrustedIdentityTokenIssuer.ProviderRealms" { - Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true - } - } + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Present" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realms removed SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } - Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be updated" -Fixture { - $testParams = @{ - IssuerName = "Contoso" - ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://search.contoso.com" - RealmUrn = "urn:sharepoint:contoso:search" - } -ClientOnly) - (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ - RealmUrl = "https://intranet.contoso.com" - RealmUrn = "urn:sharepoint:contoso:intranet" - } -ClientOnly)) - Ensure = "Present" - } + Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be updated" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } - $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 - - $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' - foreach ($realm in $testParams.ProviderRealms) - { - $url = New-Object System.Uri($realm.RealmUrl) - $realmsDict[$url.ToString()] = $realm.RealmUrn - } - - $realmsDict["https://intranet.contoso.com/"]="urn:sharepoint:contoso:intranet1" - - $realmRet = [pscustomobject]@{ - ProviderRealms = $realmsDict - } - - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - - $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount - } -Force + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmsDict["https://intranet.contoso.com/"]="urn:sharepoint:contoso:intranet1" + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force - $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount - } -Force - - - Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { - return $realmRet - } - - It "Get-TargetResource: Should return present" { - $getResults = Get-TargetResource @testParams - $getResults.Ensure | Should Be "Absent" - } - - It "Test-TargetResource: Should return false" { - Test-TargetResource @testParams | Should Be $false - } - - It "Set-TargetResource: Realm updated in SPTrustedIdentityTokenIssuer.ProviderRealms" { - Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true - } - } - } + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realm updated in SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + } } Invoke-Command -ScriptBlock $Global:SPDscHelper.CleanupScript -NoNewScope - From ff393941bff70ab5ab0bc8449ecd5e70693c4abe Mon Sep 17 00:00:00 2001 From: lazdalt Date: Fri, 2 Feb 2018 17:26:27 +0100 Subject: [PATCH 03/56] Markup and minor fixes --- ...stedIdentityTokenIssuerProviderRealms.psm1 | 46 +++++++++---------- .../readme.md | 16 ++----- ...dentityTokenIssuerProviderRealms.Tests.ps1 | 16 ++----- 3 files changed, 30 insertions(+), 48 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index 54ffeb272..2e161c41d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -4,20 +4,20 @@ function Get-TargetResource [OutputType([System.Collections.Hashtable])] param ( - [parameter(Mandatory = $true)] + [Parameter(Mandatory = $true)] [string] $IssuerName, - [parameter(Mandatory = $true)] + [Parameter(Mandatory = $true)] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, - [parameter(Mandatory = $false)] + [Parameter()] [ValidateSet("Present","Absent")] [String] $Ensure = "Present", - [parameter(Mandatory = $false)] + [Parameter()] [System.Management.Automation.PSCredential] $InstallAccount ) @@ -29,13 +29,9 @@ function Get-TargetResource -ScriptBlock { $params = $args[0] - $paramRealms = $params.ProviderRealms | % { "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } - #$paramRealms =@{} - #foreach($cKey in $params.ProviderRealms) - #{ - # $url= New-Object System.Uri($cKey.RealmUrl) - #} - + $paramRealms = $params.ProviderRealms | ForEach-Object { + "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue @@ -44,9 +40,13 @@ function Get-TargetResource throw "SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found" } - $currentRealms =$spTrust.ProviderRealms.GetEnumerator() | %{ "$($_.Key)=$($_.Value)" } + $currentRealms =$spTrust.ProviderRealms.GetEnumerator() | ForEach-Object { + "$($_.Key)=$($_.Value)" + } - $diffObjects = $paramRealms | ?{$currentRealms -contains $_} + $diffObjects = $paramRealms | Where-Object { + $currentRealms -contains $_ + } if($params.Ensure -eq "Present") { @@ -73,32 +73,30 @@ function Set-TargetResource [CmdletBinding()] param ( - [parameter(Mandatory = $true)] + [Parameter(Mandatory = $true)] [string] $IssuerName, - [parameter(Mandatory = $true)] + [Parameter(Mandatory = $true)] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, - [parameter(Mandatory = $false)] + [Parameter()] [ValidateSet("Present","Absent")] [String] $Ensure = "Present", - [parameter(Mandatory = $false)] + [Parameter()] [System.Management.Automation.PSCredential] $InstallAccount ) $CurrentValues = Get-TargetResource @PSBoundParameters - if ($Ensure -eq "Present") + if ($Ensure -eq "Present") { if ($CurrentValues.Ensure -eq "Absent") { - - Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" $result = Invoke-SPDSCCommand -Credential $InstallAccount ` @@ -178,20 +176,20 @@ function Test-TargetResource [OutputType([Boolean])] param ( - [parameter(Mandatory = $true)] + [Parameter(Mandatory = $true)] [string] $IssuerName, - [parameter(Mandatory = $true)] + [Parameter(Mandatory = $true)] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, - [parameter(Mandatory = $false)] + [Parameter()] [ValidateSet("Present","Absent")] [String] $Ensure = "Present", - [parameter(Mandatory = $false)] + [Parameter()] [System.Management.Automation.PSCredential] $InstallAccount ) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md index 8e9d622fd..51c2413fd 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -1,12 +1,6 @@ -This resource is used to add or remove provider realms to SPTrustedIdentityTokenIssuer in a -SharePoint farm. +# Description -IssuerName is the name for SPTrustedIdentityTokenIssuer - -ProviderRealms is array of MSFT_SPProviderRealm with format - @{ - Key = "" - Value = "" - } - -The default value for the Ensure parameter is Present. \ No newline at end of file +This resource is used to add or remove provider realms to +SPTrustedIdentityTokenIssuer in a SharePoint farm. IssuerName +is the name for SPTrustedIdentityTokenIssuer +The default value for the Ensure parameter is Present. diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 index e48caada2..a1831909a 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -60,10 +60,9 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $url = New-Object System.Uri($realm.RealmUrl) $realmsDict[$url.ToString()] = $realm.RealmUrn } - - $param = @{ } - $param.ProviderRealms = $realmsDict - $realmRet = New-Object –TypeName PSObject –Prop $param + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } return $realmRet } @@ -106,15 +105,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $realmRet = [pscustomobject]@{ ProviderRealms = $realmsDict } - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - [cmdletbinding()] - param ( - [Parameter(Mandatory = $true)] - $unexpandedValue - ) - process { } - } -Force - $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount } -PassThru From c6992394cc6fc67ba647042a9f9455adc6ff11eb Mon Sep 17 00:00:00 2001 From: lazdalt Date: Fri, 2 Feb 2018 18:18:21 +0100 Subject: [PATCH 04/56] MD009,MD022,MD032 --- .../readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md index 51c2413fd..eb68ef004 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -1,6 +1,6 @@ # Description -This resource is used to add or remove provider realms to -SPTrustedIdentityTokenIssuer in a SharePoint farm. IssuerName +This resource is used to add or remove provider realms to +SPTrustedIdentityTokenIssuer in a SharePoint farm. IssuerName is the name for SPTrustedIdentityTokenIssuer -The default value for the Ensure parameter is Present. +The default value for the Ensure parameter is Present From af68e1c953b68aaa16255c17f15a83b1d9bc019d Mon Sep 17 00:00:00 2001 From: lazdalt Date: Mon, 5 Feb 2018 07:44:46 +0100 Subject: [PATCH 05/56] Changelog update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f1b352d..3fe73df5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Change log for SharePointDsc ## Unreleased + * SPTrustedIdentityTokenIssuerProviderRealms * Added the resource * SPDiagnosticsProvider From f4f1f8b2f23f9906b09579c106b26c9892899877 Mon Sep 17 00:00:00 2001 From: lazdalt Date: Mon, 5 Feb 2018 16:16:31 +0100 Subject: [PATCH 06/56] Changes after review. --- ...stedIdentityTokenIssuerProviderRealms.psm1 | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index 2e161c41d..76fa92697 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -7,7 +7,7 @@ function Get-TargetResource [Parameter(Mandatory = $true)] [string] $IssuerName, - + [Parameter(Mandatory = $true)] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, @@ -23,24 +23,24 @@ function Get-TargetResource ) Write-Verbose -Message "Getting SPTrustedIdentityTokenIssuer ProviderRealms" - + $result = Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments $PSBoundParameters ` -ScriptBlock { $params = $args[0] - + $paramRealms = $params.ProviderRealms | ForEach-Object { "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue - + if (!$spTrust) { throw "SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found" } - $currentRealms =$spTrust.ProviderRealms.GetEnumerator() | ForEach-Object { + $currentRealms =$spTrust.ProviderRealms.GetEnumerator() | ForEach-Object { "$($_.Key)=$($_.Value)" } @@ -50,20 +50,19 @@ function Get-TargetResource if($params.Ensure -eq "Present") { - $present = $($diffObjects).Count -eq $($paramRealms).Count + $present = $diffObjects.Count -eq $paramRealms.Count } else { - $present = !$($($diffObjects).Count -eq 0) + $present = $diffObjects.Count -ne 0 } - + $currentState = @{$true = "Present"; $false = "Absent"}[$present] - return @{ IssuerName = $params.IssuerName ProviderRealms = $spTrust.ProviderRealms Ensure = $currentState - } + } } return $result } @@ -90,23 +89,25 @@ function Set-TargetResource [System.Management.Automation.PSCredential] $InstallAccount ) - - $CurrentValues = Get-TargetResource @PSBoundParameters + $CurrentValues = Get-TargetResource @PSBoundParameters if ($Ensure -eq "Present") { if ($CurrentValues.Ensure -eq "Absent") { Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments $PSBoundParameters ` -ScriptBlock { $params = $args[0] - $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue - + + if($params.ProviderRealms -eq $null) + { + throw "ProviderRealms parameter is null. Check parametercnofiguration" + } + foreach($cKey in $params.ProviderRealms) { $url= New-Object System.Uri($cKey.RealmUrl) @@ -115,7 +116,7 @@ function Set-TargetResource if($trust.ProviderRealms[$url.AbsoluteUri] -ne $cKey.RealmUrn) { Write-Verbose -Message "The provider realm '$($cKey.RealmUrl)' exists but has different value. Updating to '$($cKey.RealmUrn)'" - $trust.ProviderRealms.Remove($url) + $trust.ProviderRealms.Remove($url) $trust.ProviderRealms.Add($url, $cKey.Value) } else @@ -127,10 +128,8 @@ function Set-TargetResource { Write-Verbose -Message "Adding new provider realm '$($cKey.RealmUrl)'" $trust.ProviderRealms.Add($url, $cKey.Value) - } } - $trust.Update() } } @@ -145,11 +144,14 @@ function Set-TargetResource $update = $false $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue + if($params.ProviderRealms -eq $null) + { + throw "ProviderRealms parameter is null. Check parametercnofiguration" + } foreach($cKey in $params.ProviderRealms) { $url=[System.Uri]$cKey.RealmUrl - if ($trust.ProviderRealms.ContainsKey($url)) { Write-Verbose -Message "Removing provider realm '$($cKey.RealmUrl)'." @@ -157,7 +159,7 @@ function Set-TargetResource $update = $true } } - + if($update -eq $true) { $trust.Update() @@ -179,7 +181,7 @@ function Test-TargetResource [Parameter(Mandatory = $true)] [string] $IssuerName, - + [Parameter(Mandatory = $true)] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, @@ -195,9 +197,9 @@ function Test-TargetResource ) Write-Verbose -Message "Testing SPTrustedIdentityTokenIssuer provider realms" - + $CurrentValues = Get-TargetResource @PSBoundParameters - + return Test-SPDscParameterState -CurrentValues $CurrentValues ` -DesiredValues $PSBoundParameters ` -ValuesToCheck @("Ensure") From 448e9a542d1f70dd400ae5ca337748ceb115ea2c Mon Sep 17 00:00:00 2001 From: lazdalt Date: Mon, 5 Feb 2018 17:03:21 +0100 Subject: [PATCH 07/56] Example header fix and $null to left in conditions. --- .../MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 | 4 ++-- .../SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index 76fa92697..e865369ba 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -103,7 +103,7 @@ function Set-TargetResource $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue - if($params.ProviderRealms -eq $null) + if($null -eq $params.ProviderRealms) { throw "ProviderRealms parameter is null. Check parametercnofiguration" } @@ -144,7 +144,7 @@ function Set-TargetResource $update = $false $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue - if($params.ProviderRealms -eq $null) + if($null -eq $params.ProviderRealms) { throw "ProviderRealms parameter is null. Check parametercnofiguration" } diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 index 025b1a79b..01bc4f41b 100644 --- a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 @@ -1,3 +1,8 @@ +<# +.EXAMPLE + This example adds provider realms to existing trusted token issuer. +#> + Configuration Example { param( From 8849345ea9976cf5adf01121b13af11cb81da087 Mon Sep 17 00:00:00 2001 From: lazdalt Date: Tue, 6 Feb 2018 09:48:57 +0100 Subject: [PATCH 08/56] Review fixes --- .../MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index e865369ba..f492ef5c3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -44,7 +44,7 @@ function Get-TargetResource "$($_.Key)=$($_.Value)" } - $diffObjects = $paramRealms | Where-Object { + $diffObjects = $paramRealms | Select-Object -Unique | Where-Object { $currentRealms -contains $_ } @@ -164,10 +164,6 @@ function Set-TargetResource { $trust.Update() } - else - { - throw "Provider realm '$($cKey.RealmUrl)' does not exist." - } } } } From d35d0c0c6062d30c99466bcafd15616fa57ef7f3 Mon Sep 17 00:00:00 2001 From: lazdalt Date: Wed, 7 Feb 2018 12:41:31 +0100 Subject: [PATCH 09/56] gitignore and SP cmdlet path fix --- .gitignore | 1 - CHANGELOG.md | 7 +++++-- ...sc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 77eb6867e..224ea0ddf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,3 @@ Modules/SharePointDsc/DscResource.Tests/* node_modules node_modules/* markdownissues.txt -/package-lock.json diff --git a/CHANGELOG.md b/CHANGELOG.md index fa8f66e68..5224cb305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,11 @@ ## Unreleased * General - * Updated the integration tests for building the Azure environment to work in - any Azure environment. + * Updated the integration tests for building the Azure environment + * Works in any Azure environment. + * Updated the SqlServer configuration to use SqlServerDsc version 10.0.0.0. +* SPAlternateURL + * Added the ability to manage the Central Administration AAMs * SPTrustedIdentityTokenIssuerProviderRealms * Added the resource * SPDiagnosticsProvider diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 index a1831909a..9dd8ae1a7 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -1,7 +1,7 @@ [CmdletBinding()] param ( [Parameter()] - [string]$SharePointCmdletModule = (Join-Path -Path "C:\Users\Administrator\Source\Repos\SharePointDsc\Tests\Unit\SharePointDsc" ` + [string]$SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` -Resolve) ) From 8d1386c69bc4f9371c6d7103969a45bdef3922ba Mon Sep 17 00:00:00 2001 From: lazdalt Date: Mon, 12 Feb 2018 08:47:57 +0100 Subject: [PATCH 10/56] New version --- ...stedIdentityTokenIssuerProviderRealms.psm1 | 213 +++++--- ...entityTokenIssuerProviderRealms.schema.mof | 16 +- .../readme.md | 12 +- .../1-Example.ps1 | 51 +- .../2-Example.ps1 | 37 ++ .../3-Example.ps1 | 37 ++ .../4-Example.ps1 | 49 ++ .../SharePointDsc.Util.psm1 | 108 ++++ Modules/SharePointDsc/SharePointDsc.psd1 | 3 +- ...dentityTokenIssuerProviderRealms.Tests.ps1 | 500 +++++++++++++++++- 10 files changed, 899 insertions(+), 127 deletions(-) create mode 100644 Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 create mode 100644 Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 create mode 100644 Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index f492ef5c3..b4219625e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -8,10 +8,18 @@ function Get-TargetResource [string] $IssuerName, - [Parameter(Mandatory = $true)] + [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + [Parameter()] [ValidateSet("Present","Absent")] [String] @@ -28,9 +36,27 @@ function Get-TargetResource -Arguments $PSBoundParameters ` -ScriptBlock { $params = $args[0] + $paramRealms = $null + $includeRealms = $null + $excludeRealms = $null + + if(!!$params.ProviderRealms) + { + $paramRealms = $params.ProviderRealms | ForEach-Object { + "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + } + + if(!!$params.ProviderRealmsToInclude) + { + $includeRealms = $params.ProviderRealmsToInclude | ForEach-Object { + "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + } - $paramRealms = $params.ProviderRealms | ForEach-Object { + if(!!$params.ProviderRealmsToExclude) + { + $excludeRealms = $params.ProviderRealmsToExclude | ForEach-Object { "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + } $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue @@ -40,27 +66,37 @@ function Get-TargetResource throw "SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found" } - $currentRealms =$spTrust.ProviderRealms.GetEnumerator() | ForEach-Object { - "$($_.Key)=$($_.Value)" + if($spTrust.ProviderRealms.Count -gt 0) + { + $currentRealms = $spTrust.ProviderRealms.GetEnumerator() | ForEach-Object { + "$($_.Key)=$($_.Value)" + } } - $diffObjects = $paramRealms | Select-Object -Unique | Where-Object { - $currentRealms -contains $_ - } + $diffObjects = Get-ProviderRealmsChanges -currentRealms $currentRealms -desiredRealms $paramRealms ` + -includeRealms $includeRealms -excludeRealms $excludeRealms - if($params.Ensure -eq "Present") - { - $present = $diffObjects.Count -eq $paramRealms.Count - } - else + $state = $diffObjects.Count -eq 0 + + if($params.Ensure -eq "Absent") { - $present = $diffObjects.Count -ne 0 + if($state) + { + $state = $currentRealms.Count -gt 0 + } + else + { + $state = $true + } } - $currentState = @{$true = "Present"; $false = "Absent"}[$present] + $currentState = @{$true = "Present"; $false = "Absent"}[$state] + return @{ IssuerName = $params.IssuerName ProviderRealms = $spTrust.ProviderRealms + ProviderRealmsToInclude = $params.ProviderRealmsToInclude + ProviderRealmsToExclude = $params.ProviderRealmsToExclude Ensure = $currentState } } @@ -76,10 +112,18 @@ function Set-TargetResource [string] $IssuerName, - [Parameter(Mandatory = $true)] + [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + [Parameter()] [ValidateSet("Present","Absent")] [String] @@ -89,82 +133,73 @@ function Set-TargetResource [System.Management.Automation.PSCredential] $InstallAccount ) - - $CurrentValues = Get-TargetResource @PSBoundParameters - if ($Ensure -eq "Present") - { - if ($CurrentValues.Ensure -eq "Absent") - { - Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` - -ErrorAction SilentlyContinue - - if($null -eq $params.ProviderRealms) - { - throw "ProviderRealms parameter is null. Check parametercnofiguration" - } - - foreach($cKey in $params.ProviderRealms) - { - $url= New-Object System.Uri($cKey.RealmUrl) - if ($trust.ProviderRealms.ContainsKey($url)) - { - if($trust.ProviderRealms[$url.AbsoluteUri] -ne $cKey.RealmUrn) - { - Write-Verbose -Message "The provider realm '$($cKey.RealmUrl)' exists but has different value. Updating to '$($cKey.RealmUrn)'" - $trust.ProviderRealms.Remove($url) - $trust.ProviderRealms.Add($url, $cKey.Value) - } - else - { - Write-Verbose -Message "Provider realm '$($cKey.RealmUrl)' exists. Skipping." - } - } - else - { - Write-Verbose -Message "Adding new provider realm '$($cKey.RealmUrl)'" - $trust.ProviderRealms.Add($url, $cKey.Value) - } - } - $trust.Update() - } - } - } - else - { - Write-Verbose "Removing SPTrustedIdentityTokenIssuer provider realms" + $CurrentValues = Get-TargetResource @PSBoundParameters + + Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" $result = Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments $PSBoundParameters ` -ScriptBlock { $params = $args[0] - $update = $false - $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` - -ErrorAction SilentlyContinue - if($null -eq $params.ProviderRealms) - { - throw "ProviderRealms parameter is null. Check parametercnofiguration" - } - foreach($cKey in $params.ProviderRealms) - { - $url=[System.Uri]$cKey.RealmUrl - if ($trust.ProviderRealms.ContainsKey($url)) - { - Write-Verbose -Message "Removing provider realm '$($cKey.RealmUrl)'." - $trust.ProviderRealms.Remove($url) - $update = $true - } - } + $paramRealms = $null + $includeRealms = $null + $excludeRealms = $null + + if(!!$params.ProviderRealms) + { + $paramRealms = $params.ProviderRealms | ForEach-Object { + "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + } + + if(!!$params.ProviderRealmsToInclude) + { + $includeRealms = $params.ProviderRealmsToInclude | ForEach-Object { + "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + } + + if(!!$params.ProviderRealmsToExclude) + { + $excludeRealms = $params.ProviderRealmsToExclude | ForEach-Object { + "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + } - if($update -eq $true) - { - $trust.Update() + $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName -ErrorAction SilentlyContinue + + $currentRealms =$trust.ProviderRealms.GetEnumerator() | ForEach-Object { + "$($_.Key)=$($_.Value)" + } + + $diffObjects = Get-ProviderRealmsChanges -currentRealms $currentRealms -desiredRealms $paramRealms ` + -includeRealms $includeRealms -excludeRealms $excludeRealms + + $needsUpdate = $false + if($params.Ensure -eq "Absent" ` + -and $params.Ensure -ne $CurrentValues.Ensure ` + -and $diffObjects.Count -le 1) + { + $currentRealms | ForEach-Object { + Write-Verbose "Removing Realm $([System.Uri]$_.Split('=')[0])" + $trust.ProviderRealms.Remove([System.Uri]$_.Split('=')[0]) + $needsUpdate = $true } - } + } + else + { + $diffObjects | Where-Object {$_.Split('=')[0]-eq "Remove"} | ForEach-Object { + Write-Verbose "Removing Realm $([System.Uri]$_.Split('=')[1])" + $trust.ProviderRealms.Remove([System.Uri]$_.Split('=')[1]) + $needsUpdate = $true + } + $diffObjects | Where-Object {$_.Split('=')[0]-eq "Add"} | ForEach-Object { + Write-Verbose "Adding Realm $([System.Uri]$_.Split('=')[1])" + $trust.ProviderRealms.Add([System.Uri]$_.Split('=')[1],$_.Split('=')[2]) + $needsUpdate = $true + } + } + if($needsUpdate) + { + $trust.Update() + } } } @@ -178,10 +213,18 @@ function Test-TargetResource [string] $IssuerName, - [Parameter(Mandatory = $true)] + [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $ProviderRealms, + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + [Parameter()] [ValidateSet("Present","Absent")] [String] diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof index aaad61662..02fada8b3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof @@ -4,11 +4,25 @@ class MSFT_SPProviderRealm [Key, Description("Realm Url")] String RealmUrl; [Required, Description("RealmUrn")] String RealmUrn; }; +[ClassVersion("1.0.0.0")] +class MSFT_SPProviderRealmToInclude +{ + [Key, Description("Realm Url")] String RealmUrl; + [Required, Description("RealmUrn")] String RealmUrn; +}; +[ClassVersion("1.0.0.0")] +class MSFT_SPProviderRealmToExclude +{ + [Key, Description("Realm Url")] String RealmUrl; + [Required, Description("RealmUrn")] String RealmUrn; +}; [ClassVersion("1.0.0.0"), FriendlyName("SPTrustedIdentityTokenIssuerProviderRealms")] class MSFT_SPTrustedIdentityTokenIssuerProviderRealms : OMI_BaseResource { [Key, Description("Name of the SPTrustedIdentityTokenIssuer")] String IssuerName; - [Required, EmbeddedInstance("MSFT_SPProviderRealm"), Description("Provider Realms that is passed to identity provider")] String ProviderRealms[]; + [Write, EmbeddedInstance("MSFT_SPProviderRealm"), Description("Realms to set. Those not in this list will be removed")] String ProviderRealms[]; + [Write, EmbeddedInstance("MSFT_SPProviderRealmToInclude"), Description("Realms to add. Realms not in this list will be left")] String ProviderRealmsToInclude[]; + [Write, EmbeddedInstance("MSFT_SPProviderRealmToExclude"), Description("Realms to remove. Realms not in this list will be left")] String ProviderRealmsToExclude[]; [Write, Description("Present if the ProviderRealms should be created, or Absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; }; diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md index eb68ef004..a4c87428f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -1,6 +1,12 @@ # Description This resource is used to add or remove provider realms to -SPTrustedIdentityTokenIssuer in a SharePoint farm. IssuerName -is the name for SPTrustedIdentityTokenIssuer -The default value for the Ensure parameter is Present +SPTrustedIdentityTokenIssuer in a SharePoint farm. The "ProviderRealms" +property will set a specific list of realms, making sure +that every realm in the list is set and all others that are +allready configured but not in this list will be removed. +The "ProviderRealmsToInclude" and "ProviderRealmsToExclude" properties +will allow you to control a specific set of realms to add or remove, +without changing any other realms that are set already. Include and +Exclude can be combined together. RealmUrl is the key and should be +unique, otherwise existing RealmUrn value will be updated/replaced. diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 index 01bc4f41b..193831f4d 100644 --- a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 @@ -1,33 +1,36 @@ <# .EXAMPLE This example adds provider realms to existing trusted token issuer. + Existing will be removed. #> - Configuration Example - { - param( - [Parameter(Mandatory = $true)] - [PSCredential] - $SetupAccount - ) - Import-DscResource -ModuleName SharePointDsc +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc - node localhost { - $ProviderRealms = @() - $ProviderRealms += MSFT_SPProviderRealm { - RealmUrl = "https://search.contoso.com" - RealmUrn = "urn:sharepoint:contoso:search" - } - $ProviderRealms += MSFT_SPProviderRealm { - RealmUrl = "https://intranet.contoso.com" - RealmUrn = "urn:sharepoint:contoso:intranet" + node localhost { + $ProviderRealms = @() + $ProviderRealms += MSFT_SPProviderRealm { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealms += MSFT_SPProviderRealm { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" } - SPTrustedIdentityTokenIssuerProviderRealms TeamSite - { - IssuerName = "Contoso" - ProviderRealms = $ProviderRealms - Ensure = "Present" - PsDscRunAsCredential = $SetupAccount - } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1OverwriteExample + { + IssuerName = "Contoso" + ProviderRealms = $ProviderRealms + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount } } +} diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 new file mode 100644 index 000000000..6b614c64a --- /dev/null +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 @@ -0,0 +1,37 @@ +<# +.EXAMPLE + This example adds provider realms to existing trusted token issuer. + Existing are left and not removed. +#> + +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + + $ProviderRealmsToInclude = @() + $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1IncludeExample + { + IssuerName = "Contoso" + ProviderRealmsToInclude = $ProviderRealmsToInclude + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } +} diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 new file mode 100644 index 000000000..e86e34369 --- /dev/null +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 @@ -0,0 +1,37 @@ +<# +.EXAMPLE + This example excludes provider realms from + existing trusted token issuer. + Existing and not excluded are left and not removed. +#> + +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + $ProviderRealmsToExclude = @() + $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1ExcludeExample + { + IssuerName = "Contoso" + ProviderRealmsToExclude = $ProviderRealmsToExclude + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } +} diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 new file mode 100644 index 000000000..fccafcefc --- /dev/null +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 @@ -0,0 +1,49 @@ +<# +.EXAMPLE + This example includes and excludes provider realms + from existing trusted token issuer. + Existing and not excluded are left and not removed. +#> + +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + $ProviderRealmsToInclude = @() + $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + $ProviderRealmsToExclude = @() + $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + RealmUrl = "https://search1.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search1" + } + + $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1IncludeExcludeExample + { + IssuerName = "Contoso" + ProviderRealmsToInclude = $ProviderRealmsToInclude + ProviderRealmsToExclude = $ProviderRealmsToExclude + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } +} diff --git a/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 b/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 index fcb3bb1fd..5d450e8d8 100644 --- a/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 +++ b/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 @@ -1,3 +1,111 @@ +function Get-ProviderRealmsChanges +{ + [CmdletBinding()] + param + ( + [Parameter()] + $currentRealms=$null, + + [Parameter()] + $desiredRealms=$null, + + [Parameter()] + $includeRealms=$null, + + [Parameter()] + $excludeRealms=$null + ) + + $res=@() + + if (!!$desiredRealms -and ((!!$includeRealms) -or (!!$excludeRealms))) + { + throw ("Cannot use the ProviderRealms parameter together with the " + ` + "ProviderRealmsToInclude or ProviderRealmsToExclude parameters") + } + + if (!$desiredRealms -and !$includeRealms -and !$excludeRealms) + { + throw ("At least one of the following parameters must be specified: " + ` + "ProviderRealms, ProviderRealmsToInclude, ProviderRealmsToExclude") + } + + if($desiredRealms.Count -gt 0) + { + $res = Compare-Object @($currentRealms | Select-Object) $desiredRealms | ` + ForEach-Object { + if($_.SideIndicator -eq "=>") + { + $("Add=$($_.InputObject)") + } + if($_.SideIndicator -eq "<="){ + "Remove=$($_.InputObject)" + } + } + } + else + { + if(!!$includeRealms -and !$excludeRealms) + { + $cHash=@{} + @($currentRealms | Select-Object) | ForEach-Object { + $cHash[$_.Split('=')[0]]=$_.Split('=')[1] + } + + $iHash=@{} + $includeRealms | ForEach-Object { + $iHash[$_.Split('=')[0]]=$_.Split('=')[1] + } + + $includeUpdates = $cHash | ForEach-Object{$_.Keys}| ` + Where-Object { + !$iHash.ContainsValue($cHash[$_]) -and $iHash.ContainsKey($_) + } | ` + ForEach-Object{ + @("Remove=$($_)=$($cHash[$_])") + } + + $res = @(Compare-Object @($currentRealms | Select-Object) $includeRealms | ` + Where-Object { + $_.SideIndicator -eq "=>" + } | ` + ForEach-Object { + "Add=$($_.InputObject)" + }) + @($includeUpdates) + } + elseif(!$includeRealms -and !!$excludeRealms) + { + $res = Compare-Object @($currentRealms | Select-Object) $excludeRealms -IncludeEqual -ExcludeDifferent | ForEach-Object{"Remove=$($_.InputObject)"} + } + else + { + $cHash=@{} + @($currentRealms | Select-Object) | ForEach-Object{$cHash[$_.Split('=')[0]]=$_.Split('=')[1]} + + $iHash=@{} + $includeRealms | ForEach-Object { + $iHash[$_.Split('=')[0]]=$_.Split('=')[1] + } + + $includeUpdates = $cHash | ForEach-Object{$_.Keys}| ` + Where-Object{!$iHash.ContainsValue($cHash[$_]) -and $iHash.ContainsKey($_)} | ` + ForEach-Object{ + @("$($_)=$($cHash[$_])") + } + + $tmpObj = Compare-Object @($currentRealms | Select-Object) $includeRealms -IncludeEqual | ` + Where-Object{$includeUpdates -notcontains $_.InputObject} | ` + ForEach-Object {"$($_.InputObject)" + } + + $res = Compare-Object $tmpObj $excludeRealms -IncludeEqual -ExcludeDifferent | ` + ForEach-Object{"Remove=$($_.InputObject)" + } + } + } + return $res +} + function Add-SPDSCUserToLocalAdmin { [CmdletBinding()] diff --git a/Modules/SharePointDsc/SharePointDsc.psd1 b/Modules/SharePointDsc/SharePointDsc.psd1 index 79e9a0401..619262af9 100644 --- a/Modules/SharePointDsc/SharePointDsc.psd1 +++ b/Modules/SharePointDsc/SharePointDsc.psd1 @@ -89,7 +89,8 @@ CmdletsToExport = @("Invoke-SPDSCCommand", "Get-SPDscFarmProductsInfo", "Get-SPDscFarmVersionInfo", "Convert-SPDscADGroupIDToName", - "Convert-SPDscADGroupNameToID") + "Convert-SPDscADGroupNameToID", + "Get-ProviderRealmsChanges") # Variables to export from this module #VariablesToExport = '*' diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 index 9dd8ae1a7..376ac7321 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -1,7 +1,7 @@ [CmdletBinding()] param ( [Parameter()] - [string]$SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` + [string]$SharePointCmdletModule = (Join-Path -Path "C:\Users\Administrator\Source\Repos\SharePointDsc\Tests\Unit\SharePointDsc" ` -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` -Resolve) ) @@ -16,8 +16,8 @@ $Global:SPDscHelper = New-SPDscUnitTestHelper -SharePointStubModule $SharePointC Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { InModuleScope -ModuleName $Global:SPDscHelper.ModuleName -ScriptBlock { Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope - - Context -Name "The SPTrustedLoginProviderRealms not exists in the farm" -Fixture { + + Context -Name "The SPTrustedLoginProvider not exists in the farm" -Fixture { $testParams = @{ IssuerName = "Contoso" ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ @@ -37,7 +37,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { { Get-TargetResource @testParams } | Should -Throw "SPTrustedIdentityTokenIssuer 'Contoso' not found" } } - + Context -Name "The SPTrustedLoginProviderRealms already exists and should not be changed" -Fixture { $testParams = @{ IssuerName = "Contoso" @@ -75,7 +75,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $getResults.Ensure | Should Be "Present" } } - + Context -Name "The SPTrustedLoginProviderRealms already exists but one realm will be added" -Fixture { $testParams = @{ IssuerName = "Contoso" @@ -126,14 +126,71 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Test-TargetResource @testParams | Should Be $false } - It "Set-TargetResource: Realm must be added to SPTrustedIdentityTokenIssuer.ProviderRealms" { + It "Set-TargetResource: Realm added to SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ) | Should Be $true } } - + + Context -Name "The SPTrustedLoginProviderRealms empty and all will be added" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmsDict.Clear() + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -PassThru + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return absent" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realms added to SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 2 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ) | Should Be $true + } + } + Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be removed" -Fixture { $testParams = @{ IssuerName = "Contoso" @@ -149,9 +206,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } - - $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' foreach ($realm in $testParams.ProviderRealms) @@ -188,13 +244,71 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Test-TargetResource @testParams | Should Be $false } - It "Set-TargetResource: Realms removed SPTrustedIdentityTokenIssuer.ProviderRealms" { + It "Set-TargetResource: Realm removed from SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } + Context -Name "The SPTrustedLoginProviderRealms already exists and all will be removed" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Absent" + } + + + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $testParams.ProviderRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Present" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realms removed from SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 2 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + Context -Name "The SPTrustedLoginProviderRealms already exists and one realm will be updated" -Fixture { $testParams = @{ IssuerName = "Contoso" @@ -243,7 +357,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { return $realmRet } - It "Get-TargetResource: Should return present" { + It "Get-TargetResource: Should return absent" { $getResults = Get-TargetResource @testParams $getResults.Ensure | Should Be "Absent" } @@ -254,11 +368,371 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { It "Set-TargetResource: Realm updated in SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one will be excluded" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealmsToExclude = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly)) + Ensure = "Present" + } + + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $pRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return absent" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realm removed in SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 0 ` + -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one should be excluded but not found" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealmsToExclude = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search1" + } -ClientOnly)) + Ensure = "Present" + } + + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $pRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Present" + } + + It "Test-TargetResource: Should return true" { + Test-TargetResource @testParams | Should Be $true + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one should be included" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealmsToInclude = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://searchx.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly)) + Ensure = "Present" + } + + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $pRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return absent" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realm added in SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 0 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } + + Context -Name "The SPTrustedLoginProviderRealms empty and two should be included" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealmsToInclude = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + Ensure = "Present" + } + + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $pRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmsDict.Clear() + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return absent" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realms included in to SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 2 ` + -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 0 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one should be included but found" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealmsToInclude = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly)) + Ensure = "Present" + } + + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $pRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Present" + } + + It "Test-TargetResource: Should return true" { + Test-TargetResource @testParams | Should Be $true + } + + } + + Context -Name "The SPTrustedLoginProviderRealms already exists and one should be included and updated" -Fixture { + $testParams = @{ + IssuerName = "Contoso" + ProviderRealmsToInclude = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search1" + } -ClientOnly)) + Ensure = "Present" + } + + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } -ClientOnly) + (New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 + $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 + + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' + foreach ($realm in $pRealms) + { + $url = New-Object System.Uri($realm.RealmUrl) + $realmsDict[$url.ToString()] = $realm.RealmUrn + } + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount + } -Force + + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount + } -Force + + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { + ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount + } -Force + + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { + return $realmRet + } + + It "Get-TargetResource: Should return present" { + $getResults = Get-TargetResource @testParams + $getResults.Ensure | Should Be "Absent" + } + + It "Test-TargetResource: Should return false" { + Test-TargetResource @testParams | Should Be $false + } + + It "Set-TargetResource: Realm updated in SPTrustedIdentityTokenIssuer.ProviderRealms" { + Set-TargetResource @testParams + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + } } From 355d9f24acd911cf749179aaa81d4cec20101f85 Mon Sep 17 00:00:00 2001 From: lazdalt Date: Mon, 19 Mar 2018 15:34:14 +0100 Subject: [PATCH 11/56] New version. --- CHANGELOG.md | 47 ++- ...stedIdentityTokenIssuerProviderRealms.psm1 | 387 +++++++++++------- ...entityTokenIssuerProviderRealms.schema.mof | 16 +- .../readme.md | 2 +- .../2-Example.ps1 | 4 +- .../3-Example.ps1 | 4 +- .../4-Example.ps1 | 8 +- .../SharePointDsc.Util.psm1 | 154 ++----- ...dentityTokenIssuerProviderRealms.Tests.ps1 | 148 +++---- 9 files changed, 377 insertions(+), 393 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ea970d1..2484b1f08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,51 @@ ## Unreleased +* SPTrustedIdentityTokenIssuerProviderRealms + * Added the resource +* SPDistributedCacheClientSettings + * Added the new resource +* SPAlternateURL + * If resource specifies Central Admin webapp and Default Zone, the existing + AAM will be updated instead of adding a new one +* SPContentDatabase + * Fixed issue where mounting a content database which had to be upgraded + resulted in a reboot. +* SPFarmAdministrators + * Fixed issue where member comparisons was case sensitive. This had + to be case insensitive. +* SPManagedMetadataServiceApp + * Fixed issue with creating the Content Type Hub on an existing MMS + service app without Content Type Hub. +* SPManagedMetadataServiceAppDefault + * Fixed issue where .GetType().FullName and TypeName were not used + properly. +* SPTimerJobState + * Updated description of WebAppUrl parameter to make it clear that + "N/A" has to be used to specify a global timer job. +* SPUserProfileServiceApp + * Fixed issue introduced in v2.0, where the Farm Account had to have + local Administrator permissions for the resource to function properly. + * Updated resource to retrieve the Farm account from the Managed Accounts + instead of requiring it as a parameter. +* SPUserProfileSyncService + * Fixed issue introduced in v2.0, where the Farm Account had to have + local Administrator permissions for the resource to function properly. + * Updated resource to retrieve the Farm account from the Managed Accounts + instead of requiring it as a parameter. + * The FarmAccount parameter is deprecated and no longer required. Is ignored + in the code and will be removed in v3.0. +* SPVisioServiceApp + * Fixed an issue where the proxy is not properly getting created + +## 2.1 + * General * Updated the integration tests for building the Azure environment * Works in any Azure environment. * Updated the SqlServer configuration to use SqlServerDsc version 10.0.0.0. * SPAlternateURL * Added the ability to manage the Central Administration AAMs -* SPTrustedIdentityTokenIssuerProviderRealms - * Added the resource * SPDiagnosticsProvider * Added the resource * SPFarm @@ -33,15 +70,13 @@ * Fixed issue with correctly retrieving the process identity for the Search instance * Added support for LocalSystem, LocalService and NetworkService -* SPUserProfileSyncConnection - * Fixed issues with the User Profile Sync connection for SharePoint - 2016 * SPUserProfileProperty * Fixed issues with the User Profile properties for 2016 * SPUserProfileServiceAppPermissions * Removed the mandatory requirement from secondary parameters * SPUserProfileSyncConnection - * Fixed issues with the User Profile Sync connection for 2016 + * Fixed issues with the User Profile Sync connection for SharePoint + 2016 * SPUserProfileSyncService * Added returning the FarmAccount to the Get method * SPWebAppAuthentication diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index b4219625e..b5bc5df24 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -5,57 +5,50 @@ function Get-TargetResource param ( [Parameter(Mandatory = $true)] - [string] - $IssuerName, - + [string]$IssuerName, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealms, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealms, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealmsToInclude, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToInclude, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealmsToExclude, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToExclude, [Parameter()] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present", - + [ValidateSet("Present", "Absent")] + [String]$Ensure = "Present", [Parameter()] - [System.Management.Automation.PSCredential] - $InstallAccount + [System.Management.Automation.PSCredential]$InstallAccount ) Write-Verbose -Message "Getting SPTrustedIdentityTokenIssuer ProviderRealms" $result = Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments $PSBoundParameters ` - -ScriptBlock { + -ScriptBlock { $params = $args[0] - $paramRealms = $null - $includeRealms = $null - $excludeRealms = $null + $paramRealms = @{ } + $includeRealms = @{ } + $excludeRealms = @{ } + $currentRealms = @{ } - if(!!$params.ProviderRealms) + if (!!$params.ProviderRealms) { - $paramRealms = $params.ProviderRealms | ForEach-Object { - "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + $params.ProviderRealms | ForEach-Object { + $paramRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") + } } - if(!!$params.ProviderRealmsToInclude) + if (!!$params.ProviderRealmsToInclude) { - $includeRealms = $params.ProviderRealmsToInclude | ForEach-Object { - "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + $params.ProviderRealmsToInclude | ForEach-Object { + $includeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") + } } - if(!!$params.ProviderRealmsToExclude) + if (!!$params.ProviderRealmsToExclude) { - $excludeRealms = $params.ProviderRealmsToExclude | ForEach-Object { - "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } + $params.ProviderRealmsToExclude | ForEach-Object { + $excludeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") + } } $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` @@ -66,41 +59,37 @@ function Get-TargetResource throw "SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found" } - if($spTrust.ProviderRealms.Count -gt 0) + if ($spTrust.ProviderRealms.Count -gt 0) { - $currentRealms = $spTrust.ProviderRealms.GetEnumerator() | ForEach-Object { - "$($_.Key)=$($_.Value)" + $spTrust.ProviderRealms.Keys | ForEach-Object { + $currentRealms.Add("$($_.ToString())", "$($spTrust.ProviderRealms[$_])") } } - $diffObjects = Get-ProviderRealmsChanges -currentRealms $currentRealms -desiredRealms $paramRealms ` - -includeRealms $includeRealms -excludeRealms $excludeRealms - - $state = $diffObjects.Count -eq 0 - - if($params.Ensure -eq "Absent") - { - if($state) - { - $state = $currentRealms.Count -gt 0 - } - else - { - $state = $true - } - } - - $currentState = @{$true = "Present"; $false = "Absent"}[$state] - return @{ - IssuerName = $params.IssuerName - ProviderRealms = $spTrust.ProviderRealms - ProviderRealmsToInclude = $params.ProviderRealmsToInclude - ProviderRealmsToExclude = $params.ProviderRealmsToExclude - Ensure = $currentState + IssuerName = $params.IssuerName + ProviderRealms = $currentRealms + ProviderRealmsToInclude = $includeRealms + ProviderRealmsToExclude = $excludeRealms + CurrentRealms = $currentRealms + DesiredRealms = $paramRealms + Ensure = $params.Ensure } } - return $result + + $currentStatus = Get-ProviderRealmsStatus -currentRealms $result.ProviderRealms -desiredRealms $result.DesiredRealms ` + -includeRealms $result.ProviderRealmsToInclude -excludeRealms $result.ProviderRealmsToExclude ` + -Ensure $result.Ensure + + return @{ + IssuerName = $result.IssuerName + ProviderRealms = $result.ProviderRealms + ProviderRealmsToInclude = $result.ProviderRealmsToInclude + ProviderRealmsToExclude = $result.ProviderRealmsToExclude + CurrentRealms = $result.CurrentRealms + RealmsToAdd = $currentStatus.NewRealms + Ensure = $currentStatus.CurrentStatus + } } function Set-TargetResource @@ -109,97 +98,40 @@ function Set-TargetResource param ( [Parameter(Mandatory = $true)] - [string] - $IssuerName, - + [string]$IssuerName, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealms, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealms, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealmsToInclude, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToInclude, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealmsToExclude, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToExclude, [Parameter()] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present", - + [ValidateSet("Present", "Absent")] + [String]$Ensure = "Present", [Parameter()] - [System.Management.Automation.PSCredential] - $InstallAccount + [System.Management.Automation.PSCredential]$InstallAccount ) - $CurrentValues = Get-TargetResource @PSBoundParameters - - Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] - - $paramRealms = $null - $includeRealms = $null - $excludeRealms = $null - - if(!!$params.ProviderRealms) - { - $paramRealms = $params.ProviderRealms | ForEach-Object { - "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } - } - if(!!$params.ProviderRealmsToInclude) - { - $includeRealms = $params.ProviderRealmsToInclude | ForEach-Object { - "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } - } - - if(!!$params.ProviderRealmsToExclude) - { - $excludeRealms = $params.ProviderRealmsToExclude | ForEach-Object { - "$([System.Uri]$_.RealmUrl)=$($_.RealmUrn)" } - } - - $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName -ErrorAction SilentlyContinue - - $currentRealms =$trust.ProviderRealms.GetEnumerator() | ForEach-Object { - "$($_.Key)=$($_.Value)" - } + $CurrentValues = Get-TargetResource @PSBoundParameters + $PSBoundParameters.Add('CurrentValues', $CurrentValues) - $diffObjects = Get-ProviderRealmsChanges -currentRealms $currentRealms -desiredRealms $paramRealms ` - -includeRealms $includeRealms -excludeRealms $excludeRealms + Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" + $result = Invoke-SPDSCCommand -Credential $InstallAccount ` + -Arguments $PSBoundParameters ` + -ScriptBlock { + $params = $args[0] - $needsUpdate = $false - if($params.Ensure -eq "Absent" ` - -and $params.Ensure -ne $CurrentValues.Ensure ` - -and $diffObjects.Count -le 1) - { - $currentRealms | ForEach-Object { - Write-Verbose "Removing Realm $([System.Uri]$_.Split('=')[0])" - $trust.ProviderRealms.Remove([System.Uri]$_.Split('=')[0]) - $needsUpdate = $true - } - } - else - { - $diffObjects | Where-Object {$_.Split('=')[0]-eq "Remove"} | ForEach-Object { - Write-Verbose "Removing Realm $([System.Uri]$_.Split('=')[1])" - $trust.ProviderRealms.Remove([System.Uri]$_.Split('=')[1]) - $needsUpdate = $true - } - $diffObjects | Where-Object {$_.Split('=')[0]-eq "Add"} | ForEach-Object { - Write-Verbose "Adding Realm $([System.Uri]$_.Split('=')[1])" - $trust.ProviderRealms.Add([System.Uri]$_.Split('=')[1],$_.Split('=')[2]) - $needsUpdate = $true - } - } - if($needsUpdate) - { - $trust.Update() + if ($params.CurrentValues.RealmsToAdd.Count -gt 0) + { + $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` + -ErrorAction SilentlyContinue + $trust.ProviderRealms.Clear() + $params.CurrentValues.RealmsToAdd.Keys | ForEach-Object { + Write-Verbose "Adding Realm: $([System.Uri]$_)=$($params.CurrentValues.RealmsToAdd[$_])" + $trust.ProviderRealms.Add([System.Uri]$_, $params.CurrentValues.RealmsToAdd[$_]) } + $trust.Update() + } } } @@ -210,29 +142,18 @@ function Test-TargetResource param ( [Parameter(Mandatory = $true)] - [string] - $IssuerName, - + [string]$IssuerName, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealms, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealms, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealmsToInclude, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToInclude, [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]] - $ProviderRealmsToExclude, - + [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToExclude, [Parameter()] - [ValidateSet("Present","Absent")] - [String] - $Ensure = "Present", - + [ValidateSet("Present", "Absent")] + [String]$Ensure = "Present", [Parameter()] - [System.Management.Automation.PSCredential] - $InstallAccount + [System.Management.Automation.PSCredential]$InstallAccount ) Write-Verbose -Message "Testing SPTrustedIdentityTokenIssuer provider realms" @@ -245,3 +166,153 @@ function Test-TargetResource } Export-ModuleMember -Function *-TargetResource + +function Get-ProviderRealmsStatus() +{ + param + ( + [Parameter()] + $currentRealms = $null, + [Parameter()] + $desiredRealms = $null, + [Parameter()] + $includeRealms = $null, + [Parameter()] + $excludeRealms = $null, + [Parameter()] + $Ensure = "Present" + ) + + $res = $null + $res = New-Object PsObject + Add-Member -InputObject $res -Name "CurrentStatus" -MemberType NoteProperty -Value $null + Add-Member -InputObject $res -Name "NewRealms" -MemberType NoteProperty -Value $null + $res.CurrentStatus = "Present" + $res.NewRealms = $null + + if ($currentRealms.Count -eq 0) + { + $res.CurrentStatus = "Present" + $res.NewRealms = @{ } + + if ($desiredRealms.Count -gt 0) + { + $res.CurrentStatus = "Absent" + $res.NewRealms = $desiredRealms + } + else + { + if ($includeRealms.Count -gt 0) + { + if ($excludeRealms.Count -gt 0) + { + $excludeRealms.Keys | Where-Object + { + $includeRealms.ContainsKey($_) -and $includeRealms[$_] -eq $excludeRealms[$_] + } | ForEach-Object { $includeRealms.Remove($_) } + } + + $res.CurrentStatus = "Absent" + $res.NewRealms = $includeRealms + } + } + return $res + } + + if ($Ensure -eq "Present") + { + if ($desiredRealms.Count -gt 0) + { + $eqBoth = @{ } + + $desiredRealms.Keys | Where-Object { + $currentRealms.ContainsKey($_) -and $currentRealms[$_] -eq $desiredRealms[$_] + } | ForEach-Object { $eqBoth.Add("$($_)", "$($currentRealms[$_])") } + + if ($eqBoth.Count -eq $desiredRealms.Count) + { + return $res + } + else + { + $res.CurrentStatus = "Absent" + $res.NewRealms = $desiredRealms + return $res + } + } + else + { + if ($includeRealms.Count -gt 0) + { + $inclusion = @{ } + $includeRealms.Keys | Where-Object { + !$currentRealms.ContainsKey($_) -and $currentRealms[$_] -ne $includeRealms[$_] + } | ForEach-Object { $inclusion.Add("$($_)", "$($includeRealms[$_])") } + + $update = @{ } + $includeRealms.Keys | Where-Object { + $currentRealms.ContainsKey($_) -and $currentRealms[$_] -ne $includeRealms[$_] + } | ForEach-Object { $update.Add("$($_)", "$($includeRealms[$_])") } + } + + if ($update.Count -gt 0) + { + $update.Keys | ForEach-Object{ $currentRealms[$_] = $update[$_] } + } + + if ($inclusion.Count -gt 0) + { + $inclusion.Keys | ForEach-Object { $currentRealms.Add($_, $inclusion[$_]) } + } + + if ($excludeRealms.Count -gt 0) + { + $exclusion = @{ } + + $excludeRealms.Keys | Where-Object { + $currentRealms.ContainsKey($_) -and $currentRealms[$_] -eq $excludeRealms[$_] + } | ForEach-Object { $exclusion.Add("$($_)", "$($excludeRealms[$_])") } + + if ($exclusion.Count -gt 0) + { + $exclusion.Keys | ForEach-Object{ $currentRealms.Remove($_) } + } + } + + if ($inclusion.Count -gt 0 -or $update.Count -gt 0 -or $exclusion.Count -gt 0) + { + $res.CurrentStatus = "Absent" + $res.NewRealms = $currentRealms + return $res + } + else + { + return $res + } + } + } + else + { + if ($includeRealms.Count -gt 0 -or $excludeRealms.Count -gt 0) + { + throw "Parameters ProviderRealmsToInclude and/or ProviderRealmsToExclude can not be used together with Ensure='Absent' use ProviderRealms instead" + } + + $eqBoth = $desiredRealms.Keys | Where-Object { + $currentRealms.ContainsKey($_) -and $currentRealms[$_] -eq $desiredRealms[$_] + } | ForEach-Object { + @{ "$($_)" = "$($currentRealms[$_])" } + } + + if ($eqBoth.Count -eq 0) + { + $res.CurrentStatus = "Absent" + return $res + } + else + { + $res.NewRealms = $eqBoth + return $res + } + } +} diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof index 02fada8b3..376d3756b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof @@ -4,25 +4,13 @@ class MSFT_SPProviderRealm [Key, Description("Realm Url")] String RealmUrl; [Required, Description("RealmUrn")] String RealmUrn; }; -[ClassVersion("1.0.0.0")] -class MSFT_SPProviderRealmToInclude -{ - [Key, Description("Realm Url")] String RealmUrl; - [Required, Description("RealmUrn")] String RealmUrn; -}; -[ClassVersion("1.0.0.0")] -class MSFT_SPProviderRealmToExclude -{ - [Key, Description("Realm Url")] String RealmUrl; - [Required, Description("RealmUrn")] String RealmUrn; -}; [ClassVersion("1.0.0.0"), FriendlyName("SPTrustedIdentityTokenIssuerProviderRealms")] class MSFT_SPTrustedIdentityTokenIssuerProviderRealms : OMI_BaseResource { [Key, Description("Name of the SPTrustedIdentityTokenIssuer")] String IssuerName; [Write, EmbeddedInstance("MSFT_SPProviderRealm"), Description("Realms to set. Those not in this list will be removed")] String ProviderRealms[]; - [Write, EmbeddedInstance("MSFT_SPProviderRealmToInclude"), Description("Realms to add. Realms not in this list will be left")] String ProviderRealmsToInclude[]; - [Write, EmbeddedInstance("MSFT_SPProviderRealmToExclude"), Description("Realms to remove. Realms not in this list will be left")] String ProviderRealmsToExclude[]; + [Write, EmbeddedInstance("MSFT_SPProviderRealm"), Description("Realms to add. Realms not in this list will be left")] String ProviderRealmsToInclude[]; + [Write, EmbeddedInstance("MSFT_SPProviderRealm"), Description("Realms to remove. Realms not in this list will be left")] String ProviderRealmsToExclude[]; [Write, Description("Present if the ProviderRealms should be created, or Absent if it should be removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount; }; diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md index a4c87428f..e6c7b9f51 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -4,7 +4,7 @@ This resource is used to add or remove provider realms to SPTrustedIdentityTokenIssuer in a SharePoint farm. The "ProviderRealms" property will set a specific list of realms, making sure that every realm in the list is set and all others that are -allready configured but not in this list will be removed. +already configured but not in this list will be removed. The "ProviderRealmsToInclude" and "ProviderRealmsToExclude" properties will allow you to control a specific set of realms to add or remove, without changing any other realms that are set already. Include and diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 index 6b614c64a..7c8a3db78 100644 --- a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/2-Example.ps1 @@ -16,12 +16,12 @@ Configuration Example node localhost { $ProviderRealmsToInclude = @() - $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + $ProviderRealmsToInclude += MSFT_SPProviderRealm { RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } - $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + $ProviderRealmsToInclude += MSFT_SPProviderRealm { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 index e86e34369..f60ed5d17 100644 --- a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/3-Example.ps1 @@ -16,12 +16,12 @@ Configuration Example node localhost { $ProviderRealmsToExclude = @() - $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + $ProviderRealmsToExclude += MSFT_SPProviderRealm { RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } - $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + $ProviderRealmsToExclude += MSFT_SPProviderRealm { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } diff --git a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 index fccafcefc..debd71402 100644 --- a/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/4-Example.ps1 @@ -16,23 +16,23 @@ Configuration Example node localhost { $ProviderRealmsToInclude = @() - $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + $ProviderRealmsToInclude += MSFT_SPProviderRealm { RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } - $ProviderRealmsToInclude += MSFT_SPProviderRealmToInclude { + $ProviderRealmsToInclude += MSFT_SPProviderRealm { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } $ProviderRealmsToExclude = @() - $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + $ProviderRealmsToExclude += MSFT_SPProviderRealm { RealmUrl = "https://search1.contoso.com" RealmUrn = "urn:sharepoint:contoso:search1" } - $ProviderRealmsToExclude += MSFT_SPProviderRealmToExclude { + $ProviderRealmsToExclude += MSFT_SPProviderRealm { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } diff --git a/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 b/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 index 5d450e8d8..8073a8fa7 100644 --- a/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 +++ b/Modules/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 @@ -1,111 +1,3 @@ -function Get-ProviderRealmsChanges -{ - [CmdletBinding()] - param - ( - [Parameter()] - $currentRealms=$null, - - [Parameter()] - $desiredRealms=$null, - - [Parameter()] - $includeRealms=$null, - - [Parameter()] - $excludeRealms=$null - ) - - $res=@() - - if (!!$desiredRealms -and ((!!$includeRealms) -or (!!$excludeRealms))) - { - throw ("Cannot use the ProviderRealms parameter together with the " + ` - "ProviderRealmsToInclude or ProviderRealmsToExclude parameters") - } - - if (!$desiredRealms -and !$includeRealms -and !$excludeRealms) - { - throw ("At least one of the following parameters must be specified: " + ` - "ProviderRealms, ProviderRealmsToInclude, ProviderRealmsToExclude") - } - - if($desiredRealms.Count -gt 0) - { - $res = Compare-Object @($currentRealms | Select-Object) $desiredRealms | ` - ForEach-Object { - if($_.SideIndicator -eq "=>") - { - $("Add=$($_.InputObject)") - } - if($_.SideIndicator -eq "<="){ - "Remove=$($_.InputObject)" - } - } - } - else - { - if(!!$includeRealms -and !$excludeRealms) - { - $cHash=@{} - @($currentRealms | Select-Object) | ForEach-Object { - $cHash[$_.Split('=')[0]]=$_.Split('=')[1] - } - - $iHash=@{} - $includeRealms | ForEach-Object { - $iHash[$_.Split('=')[0]]=$_.Split('=')[1] - } - - $includeUpdates = $cHash | ForEach-Object{$_.Keys}| ` - Where-Object { - !$iHash.ContainsValue($cHash[$_]) -and $iHash.ContainsKey($_) - } | ` - ForEach-Object{ - @("Remove=$($_)=$($cHash[$_])") - } - - $res = @(Compare-Object @($currentRealms | Select-Object) $includeRealms | ` - Where-Object { - $_.SideIndicator -eq "=>" - } | ` - ForEach-Object { - "Add=$($_.InputObject)" - }) + @($includeUpdates) - } - elseif(!$includeRealms -and !!$excludeRealms) - { - $res = Compare-Object @($currentRealms | Select-Object) $excludeRealms -IncludeEqual -ExcludeDifferent | ForEach-Object{"Remove=$($_.InputObject)"} - } - else - { - $cHash=@{} - @($currentRealms | Select-Object) | ForEach-Object{$cHash[$_.Split('=')[0]]=$_.Split('=')[1]} - - $iHash=@{} - $includeRealms | ForEach-Object { - $iHash[$_.Split('=')[0]]=$_.Split('=')[1] - } - - $includeUpdates = $cHash | ForEach-Object{$_.Keys}| ` - Where-Object{!$iHash.ContainsValue($cHash[$_]) -and $iHash.ContainsKey($_)} | ` - ForEach-Object{ - @("$($_)=$($cHash[$_])") - } - - $tmpObj = Compare-Object @($currentRealms | Select-Object) $includeRealms -IncludeEqual | ` - Where-Object{$includeUpdates -notcontains $_.InputObject} | ` - ForEach-Object {"$($_.InputObject)" - } - - $res = Compare-Object $tmpObj $excludeRealms -IncludeEqual -ExcludeDifferent | ` - ForEach-Object{"Remove=$($_.InputObject)" - } - } - } - return $res -} - function Add-SPDSCUserToLocalAdmin { [CmdletBinding()] @@ -128,6 +20,28 @@ function Add-SPDSCUserToLocalAdmin ([ADSI]"WinNT://$($env:computername)/Administrators,group").Add("WinNT://$domainName/$accountName") | Out-Null } +function Clear-SPDscKerberosToken +{ + param ( + [Parameter(Mandatory=$true)] + [System.String] + $Account + ) + + $sessions = klist sessions + foreach ($session in $sessions) + { + if ($session -like "*$($Account)*") + { + Write-Verbose -Message "Purging Kerberos ticket for $LogonId" + $LogonId = $session.split(' ')[3] + $LogonId = $LogonId.Replace('0:','') + klist -li $LogonId purge | Out-Null + } + + } +} + function Convert-SPDscADGroupIDToName { param( @@ -201,7 +115,29 @@ function Get-SPDSCAssemblyVersion } -function Get-SPDSCFarmAccountName +function Get-SPDscFarmAccount +{ + [CmdletBinding()] + param + () + + $farmaccount = (Get-SPFarm).DefaultServiceAccount.Name + + $account = Get-SPManagedAccount | Where-Object -FilterScript { $_.UserName -eq $farmaccount } + + $bindings = [System.Reflection.BindingFlags]::CreateInstance -bor ` + [System.Reflection.BindingFlags]::GetField -bor ` + [System.Reflection.BindingFlags]::Instance -bor ` + [System.Reflection.BindingFlags]::NonPublic + + $pw = $account.GetType().GetField("m_Password", $bindings).GetValue($account); + + return New-Object -TypeName System.Management.Automation.PSCredential ` + -ArgumentList $farmaccount, $pw.SecureStringValue +} + + +function Get-SPDscFarmAccountName { [CmdletBinding()] param diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 index 376ac7321..4832e526f 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -30,9 +30,9 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -ClientOnly)) Ensure = "Present" } - + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $null } - + It "Should get Error message SPTrustedIdentityTokenIssuer 'Contoso' not found" { { Get-TargetResource @testParams } | Should -Throw "SPTrustedIdentityTokenIssuer 'Contoso' not found" } @@ -51,9 +51,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -ClientOnly)) Ensure = "Present" } - + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { - $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' foreach ($realm in $testParams.ProviderRealms) { @@ -69,7 +68,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { It "Test-TargetResource: Should return true" { Test-TargetResource @testParams | Should Be $true } - + It "Get-TargetResource: Should return present" { $getResults = Get-TargetResource @testParams $getResults.Ensure | Should Be "Present" @@ -89,49 +88,48 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -ClientOnly)) Ensure = "Present" } - + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 - + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' foreach ($realm in $testParams.ProviderRealms) { $url = New-Object System.Uri($realm.RealmUrl) $realmsDict[$url.ToString()] = $realm.RealmUrn } - + $realmsDict.Remove("https://intranet.contoso.com/") - + $realmRet = [pscustomobject]@{ ProviderRealms = $realmsDict } $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount } -PassThru - + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount } -Force - + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $realmRet } - + It "Get-TargetResource: Should return absent" { $getResults = Get-TargetResource @testParams $getResults.Ensure | Should Be "Absent" } - + It "Test-TargetResource: Should return false" { Test-TargetResource @testParams | Should Be $false } - + It "Set-TargetResource: Realm added to SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ) | Should Be $true + $($Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 2) | Should Be $true } - } Context -Name "The SPTrustedLoginProviderRealms empty and all will be added" -Fixture { @@ -204,11 +202,10 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -ClientOnly)) Ensure = "Absent" } - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' foreach ($realm in $testParams.ProviderRealms) { @@ -221,33 +218,27 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $realmRet = [pscustomobject]@{ ProviderRealms = $realmsDict } - - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount } -Force - - + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $realmRet } - + It "Get-TargetResource: Should return present" { $getResults = Get-TargetResource @testParams $getResults.Ensure | Should Be "Present" } - + It "Test-TargetResource: Should return false" { Test-TargetResource @testParams | Should Be $false } - + It "Set-TargetResource: Realm removed from SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + $($Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } @@ -264,11 +255,9 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -ClientOnly)) Ensure = "Absent" } - - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' foreach ($realm in $testParams.ProviderRealms) { @@ -279,33 +268,27 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $realmRet = [pscustomobject]@{ ProviderRealms = $realmsDict } - - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - + $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount } -Force - - + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $realmRet } - + It "Get-TargetResource: Should return present" { $getResults = Get-TargetResource @testParams $getResults.Ensure | Should Be "Present" } - + It "Test-TargetResource: Should return false" { Test-TargetResource @testParams | Should Be $false } - + It "Set-TargetResource: Realms removed from SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 2 ` - -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + $($Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } @@ -324,26 +307,21 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 - + $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' foreach ($realm in $testParams.ProviderRealms) { $url = New-Object System.Uri($realm.RealmUrl) $realmsDict[$url.ToString()] = $realm.RealmUrn } - + $realmsDict["https://intranet.contoso.com/"]="urn:sharepoint:contoso:intranet1" - + $realmRet = [pscustomobject]@{ ProviderRealms = $realmsDict } - - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - + $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount } -Force @@ -351,25 +329,23 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $realmRet | Add-Member -Name Update -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerUpdateCalledCount } -Force - - + Mock -CommandName Get-SPTrustedIdentityTokenIssuer -MockWith { return $realmRet } - + It "Get-TargetResource: Should return absent" { $getResults = Get-TargetResource @testParams $getResults.Ensure | Should Be "Absent" } - + It "Test-TargetResource: Should return false" { Test-TargetResource @testParams | Should Be $false } - + It "Set-TargetResource: Realm updated in SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 2 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } @@ -384,7 +360,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Ensure = "Present" } - $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } -ClientOnly) @@ -392,8 +368,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' @@ -407,10 +383,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { ProviderRealms = $realmsDict } - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount } -Force @@ -434,8 +406,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { It "Set-TargetResource: Realm removed in SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 0 ` - -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } @@ -450,7 +421,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Ensure = "Present" } - $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } -ClientOnly) @@ -494,7 +465,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Ensure = "Present" } - $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } -ClientOnly) @@ -502,8 +473,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' @@ -517,10 +488,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { ProviderRealms = $realmsDict } - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount } -Force @@ -544,8 +511,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { It "Set-TargetResource: Realm added in SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 0 ` + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 3 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } @@ -564,7 +530,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Ensure = "Present" } - $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } -ClientOnly) @@ -572,8 +538,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' @@ -589,10 +555,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { ProviderRealms = $realmsDict } - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount } -Force @@ -617,7 +579,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { It "Set-TargetResource: Realms included in to SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 2 ` - -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 0 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } @@ -632,7 +593,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Ensure = "Present" } - $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } -ClientOnly) @@ -664,7 +625,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { It "Test-TargetResource: Should return true" { Test-TargetResource @testParams | Should Be $true } - } Context -Name "The SPTrustedLoginProviderRealms already exists and one should be included and updated" -Fixture { @@ -677,7 +637,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Ensure = "Present" } - $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ + $pRealms = @((New-CimInstance -ClassName MSFT_SPProviderRealm -Property @{ RealmUrl = "https://search.contoso.com" RealmUrn = "urn:sharepoint:contoso:search" } -ClientOnly) @@ -685,8 +645,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { RealmUrl = "https://intranet.contoso.com" RealmUrn = "urn:sharepoint:contoso:intranet" } -ClientOnly)) + $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount = 0 - $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount = 0 $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount = 0 $realmsDict = New-Object 'system.collections.generic.dictionary[system.uri,string]' @@ -700,10 +660,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { ProviderRealms = $realmsDict } - $realmRet.ProviderRealms | Add-Member -Name Remove -MemberType ScriptMethod -Value { - ++$Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount - } -Force - $realmRet.ProviderRealms | Add-Member -Name Add -MemberType ScriptMethod -Value { ++$Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount } -Force @@ -727,12 +683,10 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { It "Set-TargetResource: Realm updated in SPTrustedIdentityTokenIssuer.ProviderRealms" { Set-TargetResource @testParams - $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 1 ` - -and $Global:SPTrustedIdentityTokenIssuerRemoveProviderRealmCalledCount -eq 1 ` + $($Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 2 ` -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true } } - } } From 2fc12a79fa8bdac70442a7cde109bb8225076155 Mon Sep 17 00:00:00 2001 From: lazdalt Date: Tue, 20 Mar 2018 08:49:46 +0100 Subject: [PATCH 12/56] Added parameter validation and minor adj --- ...stedIdentityTokenIssuerProviderRealms.psm1 | 32 +++++++++++++++---- ...dentityTokenIssuerProviderRealms.Tests.ps1 | 2 +- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index b5bc5df24..511b671c1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -30,21 +30,21 @@ function Get-TargetResource $excludeRealms = @{ } $currentRealms = @{ } - if (!!$params.ProviderRealms) + if ($params.ProviderRealms.Count -gt 0) { $params.ProviderRealms | ForEach-Object { $paramRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") } } - if (!!$params.ProviderRealmsToInclude) + if (!!$params.ProviderRealmsToInclude.Count -gt 0) { $params.ProviderRealmsToInclude | ForEach-Object { $includeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") } } - if (!!$params.ProviderRealmsToExclude) + if ($params.ProviderRealmsToExclude.Count -gt 0) { $params.ProviderRealmsToExclude | ForEach-Object { $excludeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") @@ -54,9 +54,9 @@ function Get-TargetResource $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue - if (!$spTrust) + if ($spTrust -eq $null) { - throw "SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found" + throw ("SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found") } if ($spTrust.ProviderRealms.Count -gt 0) @@ -125,9 +125,15 @@ function Set-TargetResource { $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue + + if ($trust -eq $null) + { + throw ("SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found") + } + $trust.ProviderRealms.Clear() $params.CurrentValues.RealmsToAdd.Keys | ForEach-Object { - Write-Verbose "Adding Realm: $([System.Uri]$_)=$($params.CurrentValues.RealmsToAdd[$_])" + Write-Verbose "Setting Realm: $([System.Uri]$_)=$($params.CurrentValues.RealmsToAdd[$_])" $trust.ProviderRealms.Add([System.Uri]$_, $params.CurrentValues.RealmsToAdd[$_]) } $trust.Update() @@ -183,6 +189,18 @@ function Get-ProviderRealmsStatus() $Ensure = "Present" ) + if ($desiredRealms.Count -gt 0 -and ($includeRealms.Count -gt 0 -or $excludeRealms.Count -gt 0)) + { + throw ("Cannot use the ProviderRealms parameter together with the " + ` + "ProviderRealmsToInclude or ProviderRealmsToExclude parameters") + } + + if ($desiredRealms.Count -eq 0 -and $includeRealms.Count -eq 0 -and $excludeRealms.Count -eq 0) + { + throw ("At least one of the following parameters must be specified: " + ` + "ProviderRealms, ProviderRealmsToInclude, ProviderRealmsToExclude") + } + $res = $null $res = New-Object PsObject Add-Member -InputObject $res -Name "CurrentStatus" -MemberType NoteProperty -Value $null @@ -295,7 +313,7 @@ function Get-ProviderRealmsStatus() { if ($includeRealms.Count -gt 0 -or $excludeRealms.Count -gt 0) { - throw "Parameters ProviderRealmsToInclude and/or ProviderRealmsToExclude can not be used together with Ensure='Absent' use ProviderRealms instead" + throw ("Parameters ProviderRealmsToInclude and/or ProviderRealmsToExclude can not be used together with Ensure='Absent' use ProviderRealms instead") } $eqBoth = $desiredRealms.Keys | Where-Object { diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 index 4832e526f..e32dbc601 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -1,7 +1,7 @@ [CmdletBinding()] param ( [Parameter()] - [string]$SharePointCmdletModule = (Join-Path -Path "C:\Users\Administrator\Source\Repos\SharePointDsc\Tests\Unit\SharePointDsc" ` + [string]$SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` -Resolve) ) From 4e9e1216da0412ac206889729e8f791bb51b79f5 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Tue, 20 Mar 2018 20:11:25 +0100 Subject: [PATCH 13/56] Update version in appveyor.yml for new release --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 49d59a557..e5fa6a074 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2.2.0.{build} +version: 2.3.0.{build} image: WMF 5 install: From 93a9a7b535dd650085f844f17f311dd8e08c06bc Mon Sep 17 00:00:00 2001 From: lazdalt Date: Thu, 22 Mar 2018 09:41:12 +0100 Subject: [PATCH 14/56] Minor changes --- CHANGELOG.md | 7 +- ...stedIdentityTokenIssuerProviderRealms.psm1 | 99 +++++++++++++------ Modules/SharePointDsc/SharePointDsc.psd1 | 3 +- 3 files changed, 76 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2484b1f08..39e8c9a23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,17 @@ * SPTrustedIdentityTokenIssuerProviderRealms * Added the resource -* SPDistributedCacheClientSettings - * Added the new resource + +## 2.2 + * SPAlternateURL * If resource specifies Central Admin webapp and Default Zone, the existing AAM will be updated instead of adding a new one * SPContentDatabase * Fixed issue where mounting a content database which had to be upgraded resulted in a reboot. +* SPDistributedCacheClientSettings + * Added the new resource * SPFarmAdministrators * Fixed issue where member comparisons was case sensitive. This had to be case insensitive. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index 511b671c1..c42c608b8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -6,19 +6,41 @@ function Get-TargetResource ( [Parameter(Mandatory = $true)] [string]$IssuerName, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealms, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToInclude, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToExclude, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + [Parameter()] [ValidateSet("Present", "Absent")] - [String]$Ensure = "Present", + [String] + $Ensure = "Present", + [Parameter()] - [System.Management.Automation.PSCredential]$InstallAccount + [System.Management.Automation.PSCredential] + $InstallAccount ) + if ($ProviderRealms.Count -gt 0 -and ($ProviderRealmsToInclude.Count -gt 0 -or $ProviderRealmsToExclude.Count -gt 0)) + { + throw ("Cannot use the ProviderRealms parameter together with the " + ` + "ProviderRealmsToInclude or ProviderRealmsToExclude parameters") + } + + if ($ProviderRealms.Count -eq 0 -and $ProviderRealmsToInclude.Count -eq 0 -and $ProviderRealmsToExclude.Count -eq 0) + { + throw ("At least one of the following parameters must be specified: " + ` + "ProviderRealms, ProviderRealmsToInclude, ProviderRealmsToExclude") + } + Write-Verbose -Message "Getting SPTrustedIdentityTokenIssuer ProviderRealms" $result = Invoke-SPDSCCommand -Credential $InstallAccount ` @@ -98,18 +120,29 @@ function Set-TargetResource param ( [Parameter(Mandatory = $true)] - [string]$IssuerName, + [string] + $IssuerName, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealms, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToInclude, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToExclude, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + [Parameter()] [ValidateSet("Present", "Absent")] - [String]$Ensure = "Present", + [String] + $Ensure = "Present", + [Parameter()] - [System.Management.Automation.PSCredential]$InstallAccount + [System.Management.Automation.PSCredential] + $InstallAccount ) $CurrentValues = Get-TargetResource @PSBoundParameters @@ -148,18 +181,29 @@ function Test-TargetResource param ( [Parameter(Mandatory = $true)] - [string]$IssuerName, + [string] + $IssuerName, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealms, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToInclude, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + [Parameter()] - [Microsoft.Management.Infrastructure.CimInstance[]]$ProviderRealmsToExclude, + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + [Parameter()] [ValidateSet("Present", "Absent")] - [String]$Ensure = "Present", + [String] + $Ensure = "Present", + [Parameter()] - [System.Management.Automation.PSCredential]$InstallAccount + [System.Management.Automation.PSCredential] + $InstallAccount ) Write-Verbose -Message "Testing SPTrustedIdentityTokenIssuer provider realms" @@ -179,28 +223,20 @@ function Get-ProviderRealmsStatus() ( [Parameter()] $currentRealms = $null, + [Parameter()] $desiredRealms = $null, + [Parameter()] $includeRealms = $null, + [Parameter()] $excludeRealms = $null, + [Parameter()] $Ensure = "Present" ) - if ($desiredRealms.Count -gt 0 -and ($includeRealms.Count -gt 0 -or $excludeRealms.Count -gt 0)) - { - throw ("Cannot use the ProviderRealms parameter together with the " + ` - "ProviderRealmsToInclude or ProviderRealmsToExclude parameters") - } - - if ($desiredRealms.Count -eq 0 -and $includeRealms.Count -eq 0 -and $excludeRealms.Count -eq 0) - { - throw ("At least one of the following parameters must be specified: " + ` - "ProviderRealms, ProviderRealmsToInclude, ProviderRealmsToExclude") - } - $res = $null $res = New-Object PsObject Add-Member -InputObject $res -Name "CurrentStatus" -MemberType NoteProperty -Value $null @@ -316,6 +352,11 @@ function Get-ProviderRealmsStatus() throw ("Parameters ProviderRealmsToInclude and/or ProviderRealmsToExclude can not be used together with Ensure='Absent' use ProviderRealms instead") } + if ($desiredRealms.Count -gt 0) + { + throw ("Parameter ProviderRealms is empty or Null") + } + $eqBoth = $desiredRealms.Keys | Where-Object { $currentRealms.ContainsKey($_) -and $currentRealms[$_] -eq $desiredRealms[$_] } | ForEach-Object { diff --git a/Modules/SharePointDsc/SharePointDsc.psd1 b/Modules/SharePointDsc/SharePointDsc.psd1 index f862d0a45..0ed32d792 100644 --- a/Modules/SharePointDsc/SharePointDsc.psd1 +++ b/Modules/SharePointDsc/SharePointDsc.psd1 @@ -89,8 +89,7 @@ CmdletsToExport = @("Invoke-SPDSCCommand", "Get-SPDscFarmProductsInfo", "Get-SPDscFarmVersionInfo", "Convert-SPDscADGroupIDToName", - "Convert-SPDscADGroupNameToID", - "Get-ProviderRealmsChanges") + "Convert-SPDscADGroupNameToID") # Variables to export from this module #VariablesToExport = '*' From 5060507597d0178ece680989f7106c5811ef0494 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 23 Mar 2018 15:06:16 -0400 Subject: [PATCH 15/56] Fixes for MySiteHostLocation and Managed Path --- .../MSFT_SPUserProfileServiceApp.psm1 | 30 +++++++++++++++++-- .../MSFT_SPUserProfileServiceApp.schema.mof | 1 + .../SPUserProfileServiceApp/1-Example.ps1 | 3 +- .../SPUserProfileServiceApp/2-NoILMUsed.ps1 | 3 +- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index fd435b029..7e0f09ea7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -20,6 +20,10 @@ function Get-TargetResource [System.String] $MySiteHostLocation, + [Parameter()] + [System.String] + $MySiteManagedPath, + [Parameter()] [System.String] $ProfileDBName, @@ -160,11 +164,26 @@ function Get-TargetResource $proxyName = $serviceAppProxy.Name } } + $upMySiteLocation = $null + $upMySiteManagedPath = $null + try { + $ca = [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]::Local + $caSite = $ca.Sites[0]; + $serviceContext = Get-SPServiceContext($caSite) + $userProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext) + $upMySiteLocation = $userProfileManager.MySiteHostUrl + $upMySiteManagedPath = $userProfileManager.PersonalSiteInclusion + } + catch { + throw "The provided My Site Location is not a valid My Site Host." + } + return @{ Name = $serviceApp.DisplayName ProxyName = $proxyName ApplicationPool = $serviceApp.ApplicationPool.Name - MySiteHostLocation = $params.MySiteHostLocation + MySiteHostLocation = $upMySiteLocation + MySiteManagedPath = $upMySiteManagedPath ProfileDBName = $databases.ProfileDatabase.Name ProfileDBServer = $databases.ProfileDatabase.NormalizedDataSource SocialDBName = $databases.SocialDatabase.Name @@ -202,6 +221,10 @@ function Set-TargetResource [System.String] $MySiteHostLocation, + [Parameter()] + [System.String] + $MySiteManagedPath, + [Parameter()] [System.String] $ProfileDBName, @@ -379,7 +402,6 @@ function Set-TargetResource { $app.NoILMUsed = $NoILMUsed } - $app.Update() } } @@ -447,6 +469,10 @@ function Test-TargetResource [System.String] $MySiteHostLocation, + [Parameter()] + [System.String] + $MySiteManagedPath, + [Parameter()] [System.String] $ProfileDBName, diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof index 78c3c099d..1df4a1880 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.schema.mof @@ -5,6 +5,7 @@ class MSFT_SPUserProfileServiceApp : OMI_BaseResource [Write, Description("The proxy name, if not specified will be /Name of service app/ Proxy")] string ProxyName; [Required, Description("The name of the application pool to run the service app in")] string ApplicationPool; [Write, Description("The URL of the my site host collection")] string MySiteHostLocation; + [Write, Description("The Managed Path of the my site sites")] string MySiteManagedPath; [Write, Description("The name of the profile database")] string ProfileDBName; [Write, Description("The name of the server to host the profile database")] string ProfileDBServer; [Write, Description("The name of the social database")] string SocialDBName; diff --git a/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/1-Example.ps1 b/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/1-Example.ps1 index 962a5464c..031b2c198 100644 --- a/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/1-Example.ps1 +++ b/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/1-Example.ps1 @@ -3,7 +3,7 @@ This example adds a new user profile service application to the local farm #> - Configuration Example + Configuration Example { param( [Parameter(Mandatory = $true)] @@ -18,6 +18,7 @@ Name = "User Profile Service Application" ApplicationPool = "SharePoint Service Applications" MySiteHostLocation = "http://my.sharepoint.contoso.local" + MySiteManagedPath = "personal" ProfileDBName = "SP_UserProfiles" ProfileDBServer = "SQL.contoso.local\SQLINSTANCE" SocialDBName = "SP_Social" diff --git a/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/2-NoILMUsed.ps1 b/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/2-NoILMUsed.ps1 index accd4a896..47a76c317 100644 --- a/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/2-NoILMUsed.ps1 +++ b/Modules/SharePointDsc/Examples/Resources/SPUserProfileServiceApp/2-NoILMUsed.ps1 @@ -3,7 +3,7 @@ This example adds a new user profile service application to the local farm #> - Configuration Example + Configuration Example { param( [Parameter(Mandatory = $true)] @@ -22,6 +22,7 @@ Name = "User Profile Service Application" ApplicationPool = "SharePoint Service Applications" MySiteHostLocation = "http://my.sharepoint.contoso.local" + MySiteManagedPath = "personal" ProfileDBName = "SP_UserProfiles" ProfileDBServer = "SQL.contoso.local\SQLINSTANCE" SocialDBName = "SP_Social" From 1cca7ee52dc975bfca7f61b24c7e6ea31f1b57ad Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 23 Mar 2018 15:08:14 -0400 Subject: [PATCH 16/56] ChangeLog --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f17d56bff..9f42a06f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,15 @@ # Change log for SharePointDsc +## Unreleased + +* SPUserProfileServiceApp + * Now supported specifying the host Managed path, and properly sets the host. + ## 2.2 * SPAlternateURL * If resource specifies Central Admin webapp and Default Zone, the existing - AAM will be updated instead of adding a new one + AAM will be updated instead of adding a new one. * SPContentDatabase * Fixed issue where mounting a content database which had to be upgraded resulted in a reboot. From 51c8dea8616b4e9de4775b11a3db66d91e3d1470 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Sun, 25 Mar 2018 13:34:27 -0400 Subject: [PATCH 17/56] Fixes for tests --- .../MSFT_SPUserProfileServiceApp.psm1 | 3 +- ...PointDsc.SPUserProfileServiceApp.Tests.ps1 | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index 7e0f09ea7..0f0938ef1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -167,7 +167,7 @@ function Get-TargetResource $upMySiteLocation = $null $upMySiteManagedPath = $null try { - $ca = [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]::Local + $ca = Get-SPWebApplication -IncludeCentralAdministration | Where-Object {$_.IsAdministrationWebApplication} $caSite = $ca.Sites[0]; $serviceContext = Get-SPServiceContext($caSite) $userProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext) @@ -402,6 +402,7 @@ function Set-TargetResource { $app.NoILMUsed = $NoILMUsed } + $app.Update() } } diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 index 31c9fafdd..6174fe652 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 @@ -27,6 +27,23 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $mockFarmCredential = New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList @("DOMAIN\sp_farm", $mockPassword) + try { [Microsoft.Office.Server.UserProfiles.UserProfileManager] } + catch { + try { + Add-Type -TypeDefinition @" + namespace Microsoft.Office.Server.UserProfiles { + public class UserProfileManager { + public UserProfileManager(System.Object a) + { + } + } + } +"@ -ErrorAction SilentlyContinue + } + catch { + Write-Verbose -Message "The Type Microsoft.Office.Server.UserProfiles.DirectoryServiceNamingContext was already added." + } + } # Mocks for all contexts Mock -CommandName Get-SPDSCFarmAccount -MockWith { return $mockFarmCredential @@ -44,6 +61,19 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName Remove-SPDSCUserToLocalAdmin -MockWith { } Mock -CommandName Remove-SPServiceApplication -MockWith { } + Mock -CommandName Get-SPWebApplication -MockWith { + return @{ + IsAdministrationWebApplication = $true + Url = "http://fake.contoso.com" + Sites = @("FakeSite1") + } + } + Mock -CommandName Get-SPServiceContext -MockWith { + return (@{ + Fake1 = $true + }) + } + # Test contexts Context -Name "When PSDSCRunAsCredential matches the Farm Account" -Fixture { $testParams = @{ From d31dca1bc31f9e90cedc2c1f2af956259eeb27cd Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 26 Mar 2018 12:32:18 -0400 Subject: [PATCH 18/56] Fixes for review --- .../MSFT_SPUserProfileServiceApp.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index 0f0938ef1..bc185f8c1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -167,8 +167,8 @@ function Get-TargetResource $upMySiteLocation = $null $upMySiteManagedPath = $null try { - $ca = Get-SPWebApplication -IncludeCentralAdministration | Where-Object {$_.IsAdministrationWebApplication} - $caSite = $ca.Sites[0]; + $ca = Get-SPWebApplication -IncludeCentralAdministration | Where-Object -FilterScript {$_.IsAdministrationWebApplication} + $caSite = $ca.Sites[0] $serviceContext = Get-SPServiceContext($caSite) $userProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext) $upMySiteLocation = $userProfileManager.MySiteHostUrl From 28df0a1e4161298bd852cb51be15226fa213386a Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 26 Mar 2018 12:44:38 -0400 Subject: [PATCH 19/56] Missing change --- .../MSFT_SPUserProfileServiceApp.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index bc185f8c1..e061cedbd 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -170,7 +170,7 @@ function Get-TargetResource $ca = Get-SPWebApplication -IncludeCentralAdministration | Where-Object -FilterScript {$_.IsAdministrationWebApplication} $caSite = $ca.Sites[0] $serviceContext = Get-SPServiceContext($caSite) - $userProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext) + $userProfileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext) $upMySiteLocation = $userProfileManager.MySiteHostUrl $upMySiteManagedPath = $userProfileManager.PersonalSiteInclusion } From 472dfdfe94bcc3c69ce95af8b95ee10c301a4f9c Mon Sep 17 00:00:00 2001 From: lazdalt Date: Wed, 28 Mar 2018 09:29:29 +0200 Subject: [PATCH 20/56] param fix --- CHANGELOG.md | 2 + ...stedIdentityTokenIssuerProviderRealms.psm1 | 105 ++++++++---------- 2 files changed, 51 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39e8c9a23..a9711a5b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * SPTrustedIdentityTokenIssuerProviderRealms * Added the resource +* SPUserProfileServiceApp + * Now supported specifying the host Managed path, and properly sets the host. ## 2.2 diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index c42c608b8..000656adc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -41,38 +41,39 @@ function Get-TargetResource "ProviderRealms, ProviderRealmsToInclude, ProviderRealmsToExclude") } + $paramRealms = @{ } + $includeRealms = @{ } + $excludeRealms = @{ } + + if ($ProviderRealms.Count -gt 0) + { + $ProviderRealms | ForEach-Object { + $paramRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") + } + } + + if ($ProviderRealmsToInclude.Count -gt 0) + { + $ProviderRealmsToInclude | ForEach-Object { + $includeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") + } + } + + if ($ProviderRealmsToExclude.Count -gt 0) + { + $ProviderRealmsToExclude | ForEach-Object { + $excludeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") + } + } + Write-Verbose -Message "Getting SPTrustedIdentityTokenIssuer ProviderRealms" $result = Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments $PSBoundParameters ` -ScriptBlock { $params = $args[0] - $paramRealms = @{ } - $includeRealms = @{ } - $excludeRealms = @{ } $currentRealms = @{ } - if ($params.ProviderRealms.Count -gt 0) - { - $params.ProviderRealms | ForEach-Object { - $paramRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") - } - } - - if (!!$params.ProviderRealmsToInclude.Count -gt 0) - { - $params.ProviderRealmsToInclude | ForEach-Object { - $includeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") - } - } - - if ($params.ProviderRealmsToExclude.Count -gt 0) - { - $params.ProviderRealmsToExclude | ForEach-Object { - $excludeRealms.Add("$([System.Uri]$_.RealmUrl)", "$($_.RealmUrn)") - } - } - $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` -ErrorAction SilentlyContinue @@ -87,28 +88,19 @@ function Get-TargetResource $currentRealms.Add("$($_.ToString())", "$($spTrust.ProviderRealms[$_])") } } - - return @{ - IssuerName = $params.IssuerName - ProviderRealms = $currentRealms - ProviderRealmsToInclude = $includeRealms - ProviderRealmsToExclude = $excludeRealms - CurrentRealms = $currentRealms - DesiredRealms = $paramRealms - Ensure = $params.Ensure - } + return $currentRealms } - $currentStatus = Get-ProviderRealmsStatus -currentRealms $result.ProviderRealms -desiredRealms $result.DesiredRealms ` - -includeRealms $result.ProviderRealmsToInclude -excludeRealms $result.ProviderRealmsToExclude ` - -Ensure $result.Ensure + $currentStatus = Get-ProviderRealmsStatus -currentRealms $result -desiredRealms $paramRealms ` + -includeRealms $includeRealms -excludeRealms $excludeRealms ` + -Ensure $Ensure return @{ - IssuerName = $result.IssuerName - ProviderRealms = $result.ProviderRealms - ProviderRealmsToInclude = $result.ProviderRealmsToInclude - ProviderRealmsToExclude = $result.ProviderRealmsToExclude - CurrentRealms = $result.CurrentRealms + IssuerName = $IssuerName + ProviderRealms = $paramRealms + ProviderRealmsToInclude = $includeRealms + ProviderRealmsToExclude = $excludeRealms + CurrentRealms = $result RealmsToAdd = $currentStatus.NewRealms Ensure = $currentStatus.CurrentStatus } @@ -146,28 +138,29 @@ function Set-TargetResource ) $CurrentValues = Get-TargetResource @PSBoundParameters - $PSBoundParameters.Add('CurrentValues', $CurrentValues) - Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" - $result = Invoke-SPDSCCommand -Credential $InstallAccount ` - -Arguments $PSBoundParameters ` - -ScriptBlock { - $params = $args[0] + if($CurrentValues.RealmsToAdd.Count -gt 0) + { + $PSBoundParameters.Add('RealmsToAdd', $CurrentValues.RealmsToAdd) + + Write-Verbose -Message "Setting SPTrustedIdentityTokenIssuer provider realms" + $result = Invoke-SPDSCCommand -Credential $InstallAccount ` + -Arguments $PSBoundParameters ` + -ScriptBlock { + $params = $args[0] - if ($params.CurrentValues.RealmsToAdd.Count -gt 0) - { $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` - -ErrorAction SilentlyContinue + -ErrorAction SilentlyContinue if ($trust -eq $null) { - throw ("SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found") + throw ("SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found") } $trust.ProviderRealms.Clear() - $params.CurrentValues.RealmsToAdd.Keys | ForEach-Object { - Write-Verbose "Setting Realm: $([System.Uri]$_)=$($params.CurrentValues.RealmsToAdd[$_])" - $trust.ProviderRealms.Add([System.Uri]$_, $params.CurrentValues.RealmsToAdd[$_]) + $params.RealmsToAdd.Keys | ForEach-Object { + Write-Verbose "Setting Realm: $([System.Uri]$_)=$($params.RealmsToAdd[$_])" + $trust.ProviderRealms.Add([System.Uri]$_, $params.RealmsToAdd[$_]) } $trust.Update() } @@ -352,7 +345,7 @@ function Get-ProviderRealmsStatus() throw ("Parameters ProviderRealmsToInclude and/or ProviderRealmsToExclude can not be used together with Ensure='Absent' use ProviderRealms instead") } - if ($desiredRealms.Count -gt 0) + if ($desiredRealms.Count -eq 0) { throw ("Parameter ProviderRealms is empty or Null") } From 3be8bed40f48c53281655fc7c6c3ebddad9e919c Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 13 Apr 2018 06:50:36 -0400 Subject: [PATCH 21/56] Resource Type Information --- CHANGELOG.md | 5 +++-- .../DSCResources/MSFT_SPAccessServiceApp/readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md | 4 ++++ .../DSCResources/MSFT_SPAntivirusSettings/readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md | 4 ++++ .../DSCResources/MSFT_SPAppManagementServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPAppStoreSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPBCSServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPBlobCacheSettings/Readme.md | 4 ++++ .../DSCResources/MSFT_SPCacheAccounts/Readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md | 4 ++++ .../DSCResources/MSFT_SPContentDatabase/Readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md | 4 ++++ .../DSCResources/MSFT_SPDesignerSettings/Readme.md | 4 ++++ .../DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md | 4 ++++ .../DSCResources/MSFT_SPDiagnosticsProvider/readme.md | 4 ++++ .../MSFT_SPDistributedCacheClientSettings/Readme.md | 4 ++++ .../DSCResources/MSFT_SPDistributedCacheService/Readme.md | 4 ++++ .../DSCResources/MSFT_SPExcelServiceApp/Readme.md | 4 ++++ Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md | 4 ++++ .../DSCResources/MSFT_SPFarmAdministrators/Readme.md | 4 ++++ .../DSCResources/MSFT_SPFarmPropertyBag/readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md | 4 ++++ Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md | 4 ++++ .../DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md | 4 ++++ .../DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md | 4 ++++ Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md | 4 ++++ .../DSCResources/MSFT_SPInstallLanguagePack/Readme.md | 4 ++++ .../DSCResources/MSFT_SPInstallPrereqs/Readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md | 4 ++++ Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md | 4 ++++ .../MSFT_SPMachineTranslationServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPManagedAccount/readme.md | 4 ++++ .../DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md | 4 ++++ .../MSFT_SPManagedMetadataServiceAppDefault/readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md | 4 ++++ .../DSCResources/MSFT_SPMinRoleCompliance/readme.md | 4 ++++ .../DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md | 4 ++++ .../DSCResources/MSFT_SPOutgoingEmailSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPPasswordChangeSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPPerformancePointServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPProductUpdate/readme.md | 4 ++++ .../MSFT_SPProjectServerADResourcePoolSync/readme.md | 4 ++++ .../MSFT_SPProjectServerAdditionalSettings/readme.md | 4 ++++ .../MSFT_SPProjectServerGlobalPermissions/readme.md | 4 ++++ .../DSCResources/MSFT_SPProjectServerGroup/readme.md | 4 ++++ .../DSCResources/MSFT_SPProjectServerLicense/readme.md | 4 ++++ .../MSFT_SPProjectServerPermissionMode/readme.md | 4 ++++ .../DSCResources/MSFT_SPProjectServerServiceApp/readme.md | 4 ++++ .../MSFT_SPProjectServerTimeSheetSettings/readme.md | 4 ++++ .../MSFT_SPProjectServerUserSyncSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPProjectServerWssSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPPublishServiceApplication/readme.md | 4 ++++ .../DSCResources/MSFT_SPQuotaTemplate/readme.md | 4 ++++ .../DSCResources/MSFT_SPRemoteFarmTrust/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchAuthoritativePage/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchContentSource/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchCrawlMapping/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchCrawlRule/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchFileType/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchIndexPartition/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchResultSource/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPSearchTopology/readme.md | 4 ++++ .../DSCResources/MSFT_SPSecureStoreServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md | 4 ++++ .../DSCResources/MSFT_SPServiceAppPool/readme.md | 4 ++++ .../DSCResources/MSFT_SPServiceAppProxyGroup/readme.md | 4 ++++ .../DSCResources/MSFT_SPServiceAppSecurity/readme.md | 4 ++++ .../DSCResources/MSFT_SPServiceIdentity/readme.md | 4 ++++ .../DSCResources/MSFT_SPServiceInstance/readme.md | 4 ++++ .../DSCResources/MSFT_SPSessionStateService/readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md | 4 ++++ Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md | 4 ++++ .../DSCResources/MSFT_SPStateServiceApp/readme.md | 4 ++++ .../MSFT_SPSubscriptionSettingsServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPTimerJobState/readme.md | 4 ++++ .../DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md | 4 ++++ .../readme.md | 4 ++++ .../DSCResources/MSFT_SPUsageApplication/readme.md | 4 ++++ .../DSCResources/MSFT_SPUserProfileProperty/readme.md | 4 ++++ .../DSCResources/MSFT_SPUserProfileSection/readme.md | 4 ++++ .../DSCResources/MSFT_SPUserProfileServiceApp/readme.md | 4 ++++ .../MSFT_SPUserProfileServiceAppPermissions/readme.md | 4 ++++ .../DSCResources/MSFT_SPUserProfileSyncConnection/readme.md | 4 ++++ .../DSCResources/MSFT_SPUserProfileSyncService/readme.md | 4 ++++ .../DSCResources/MSFT_SPVisioServiceApp/readme.md | 4 ++++ Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppAuthentication/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppGeneralSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppPermissions/readme.md | 4 ++++ .../SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppProxyGroup/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppSuiteBar/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebApplication/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebApplicationAppDomain/readme.md | 4 ++++ .../DSCResources/MSFT_SPWebApplicationExtension/readme.md | 4 ++++ .../DSCResources/MSFT_SPWordAutomationServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPWorkManagementServiceApp/readme.md | 4 ++++ .../DSCResources/MSFT_SPWorkflowService/readme.md | 4 ++++ 107 files changed, 427 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23c0acb95..9468a6231 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # Change log for SharePointDsc ## Unreleased - +* All Resources + * Added information about the Resource Type in each ReadMe.md files. * SPTrustedIdentityTokenIssuerProviderRealms - * Added the resource + * Added the resource. * SPUserProfileServiceApp * Now supported specifying the host Managed path, and properly sets the host. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md index 0cd04e512..1c0174bd9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for creating Access Services Application instances diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md index 8cf6c182a..a3f0916e0 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to define an alternate access mapping URL for a specified diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md index 59ae0bd7c..395d25740 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to set the global antivirus settings for the local farm. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md index 3b8152ccb..57e541c88 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will ensure that a specific site collection is marked as the app diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md index f515d708b..c80f2769a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will set the value for the app domain settings at the farm level. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md index 8ba228486..c8ad0d534 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to provision and manage an instance of the App Management diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md index 7ecb2bc38..63a1855d2 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will configure the ability to purchase apps for both SharePoint diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md index 4c286a5ed..edebb36bc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to provision and manage an instance of the Business diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md index 06be5b8f9..3a953cc82 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md @@ -1,3 +1,7 @@ +# Type + +Specific + # Description This resource is used to configure the Blob Cache settings for a web diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md index f7df10161..0d327ffa8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to set the "super user" and "super reader" cache accounts diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md index 7672893ff..b53e3787b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md @@ -1,3 +1,7 @@ +# Type + +Utility + # Description This resource is used to perform the upgrade step of installing SharePoint diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md index 89a9e6d34..d539cd96a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to add and remove Content Databases to web applications diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md index 6415f1198..3d3d90f90 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will allow specifying which SQL Server AlwaysOn Availability diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md index b93ad99df..029eddf82 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to set the SharePoint Designer settings for the local diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md index fb88312bc..983f615b1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for configuring settings to do with the diagnostic diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md index 6d14c7fa8..618873d09 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for configuring the Diagnostics Provider within diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md index b74dc6aa3..4c996188e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for configuring the distributed cache client diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md index 0c0d1e577..d6fd9568a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md @@ -1,3 +1,7 @@ +# Type + +Specific + # Description This resource is responsible for provisioning the distributed cache to the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md index 37f3cb872..c9bb145cc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for creating Excel Services Application instances diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md index c12703319..3b34db3cc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md @@ -1,3 +1,7 @@ +# Type + +Common + # Description This resource is used to create a new SharePoint farm and allow servers to diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md index 832f56241..94d0f15df 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to manage the membership of the farm administrators diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md index 864d6dfd8..6d9fd4391 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to work with SharePoint Property Bags at the farm level. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md index b917185b0..ca45b116b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to make sure that a specific farm solution is either diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md index 4973dde53..d086e0ce4 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to make sure that a specific feature is either enabled diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md index 3120a07d5..8d17e7502 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to configure Health Analyzer rules for the local farm. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md index da7265889..e5a7eaa48 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for configuring the InfoPath Forms service within diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md index 5de1e89a0..5a2c3627c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md @@ -1,3 +1,7 @@ +# Type + +Common + # Description This resource is used to install the SharePoint binaries. The BinaryDir diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md index c9722b21b..822e65de8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md @@ -1,3 +1,7 @@ +# Type + +Common + # Description This resource is used to install the SharePoint Language Pack binaries. The diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md index 97f74d903..b2a044ddb 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md @@ -1,3 +1,7 @@ +# Type + +Common + # Description This resource is responsible for ensuring the installation of all SharePoint diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md index c137c4e29..1975f06a8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to manipulate the IRM settings in SharePoint, integrating diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md index bf2ff4ec5..a26b13639 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to change the minimum severity of events captured in diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md index b52fba9f5..071ecf6b7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to provision and manage an instance of the Machine diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md index 9e5a42233..5b33dc06f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will ensure a managed account is provisioned in to the SharePoint diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md index fdaaf888d..289c38de7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description Creates a managed metadata service application. The application pool property diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md index 204efa0be..124f3f9fa 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description Using several managed metadata service instances in a farm requires some diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md index 6746d5522..c863b1fb2 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for creating managed paths associated with a diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md index 56cdc0ebb..02e6fdafb 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md @@ -1,3 +1,7 @@ +# Type + +Utility + # Description This resource will help manage compliance of MinRole based servers. Each time diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md index 94cbae815..dc2f22bd8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will create a binding to an Office Online Server (formerly known diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md index 2808f3f42..6cc7f6474 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to set the outgoing email settings for either a single diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md index be17fe588..b72a25d97 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to control settings that relate to the automatic diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md index 723aa7bf7..73a4bf14f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for creating Performance Point Service Application diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md index 63eb93240..5b647b8a9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md @@ -1,3 +1,7 @@ +# Type + +Common + # Description This resource is used to perform the update step of installing SharePoint diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md index ba49d0e34..78831590d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to control the settings of the Active Directory diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md index b8fe2a3c9..17044c6d3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to manage the "additional settings" for a PWA instance diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md index d1008e7eb..b6017e85a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource allows you to enforce global permissions in a PWA site for a diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md index 4c76eec94..7ebf28b31 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to configure a group within Project Server. This is only diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md index 148519caf..468b0527a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to enable a Project Server license in to a SharePoint diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md index b77cc3517..67be060be 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource allows you to set the permissions mode (either SharePoint or diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md index 723dda8da..817f8624c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for provisioning and managing the Project Server diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md index 7b0a793fd..90fc8b7b3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description Allows you to configure the default timesheet settings for a specific PWA diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md index 122be11c1..1a36a07b1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for configuration of the user sync settings between diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md index a922c8dbd..31e7eeae2 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to control settings that relate to the SharePoint sites diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md index a2b7e7508..f740ba0e6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to specify if a specific service application should be diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md index 890978ff7..3afdb51ea 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to configure quota templates in the farm. These settings diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md index 74bc5ce13..4dbd46c29 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to trust a remote SharePoint farm. This is used when diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md index 46ca782cf..c3d8e8ecb 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for managing the search authoritative pages in the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md index 2f6f4060a..baeb39da4 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will deploy and configure a content source in a specified search diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md index 0f6770f34..09f67741b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for managing the search crawl mapping in the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md index b38cd59d5..2441ab81e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for managing the search crawl rules in the search diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md index e193c9f7c..bb76bd562 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for managing the search crawl impact rules in the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md index ac43ccdcd..e7c494866 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for managing the search file types in the search diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md index 4576ce855..a1bcac100 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for creating search indexes. It works by creating diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md index bca3e5e59..bcf2bfd5b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to configure search result sources in the SharePoint diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md index 759122c71..7bbd4d2a8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for provisioning the search service application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md index 7aa81003b..de6f91e6b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for provisioning a search topology in to the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md index 94c781e4d..55cb7983b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for provisioning and configuring the secure store diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md index abe450295..81b77a1de 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for configuring the Security Token Service within diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md index 22d2455ad..f12a4486a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used for provisioning an application pool that can be used for diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md index 715de216a..d680fccf6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to manage SharePoint Service Application Proxy Groups. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md index 75933138f..73a810479 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to manage the sharing security settings of a specific diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md index a33e7ae09..b7972dc43 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to specify a managed account to be used to run a service instance. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md index c98ba5a9d..36b222783 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md @@ -1,3 +1,7 @@ +# Type + +Specific + # Description This resource is used to specify if a specific service should be running diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md index 7c26ec9ca..d538feee0 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will provision a state service app to the local farm. Specify diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md index 3bcf3a9af..58fff5078 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to manage the users with Shell Admin permissions. There diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md index d20e07062..9a2f8da13 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will provision a site collection to the current farm, based on diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md index 6ccf3b3a8..077ce096a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource provisions an instance of the state service in to the local farm. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md index c8ef54115..23f2dffcb 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to provision and manage an instance of the App Management diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md index f2b6c5b19..363f8e988 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to configure a timer job and make sure it is in a diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md index 9fa77e9b4..84f6930e3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to create or remove SPTrustedIdentityTokenIssuer in a diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md index e6c7b9f51..f4b816fc1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to add or remove provider realms to diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md index d1f9dd3ef..a69c637de 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource provisions an instance of the usage and health monitoring service diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md index 547c901fd..058c4c13d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will create a property in a user profile service application. It diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md index 83a9c2468..a853a000d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will create a section in a user profile service application. It diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md index 1e977f93f..1846e4d2e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will provision an instance of the user profile service to the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md index 243af4387..d77968e15 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will apply permissions to a user profile service application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md index 233182f52..dc8e2343f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will ensure a specifc user profile sync connection diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md index ad89863c8..d0863a67f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md @@ -1,3 +1,7 @@ +# Type + +Specific + # Description This resource is responsible for ensuring that the user profile sync service diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md index 359642836..0c187bc1e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for creating Visio Graphics Service Application diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md index dc8e08ffa..242e60ae0 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will provision a SPWeb based on the settings that are passed diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md index cf2745036..11bd84bfc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for configuring the authentication on a web diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md index 0b7084e7c..271f8f431 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for controlling the blocked file type setting on a diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md index b6ed846ab..511e3871b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for setting web application settings that are diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md index a28dd8a4d..f52de7fa8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to configure the People Picker settings for a web diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md index 87934d96f..1bb147b9d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for managing the user permissions for a web diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md index dae304c81..f225b3043 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to set the User Policies for web applications. The diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md index 5fca8e199..5358dbfc8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to associate a web application to a service application diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md index 11d074faa..a0a59e376 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for controlling the Site Use and Deletion diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md index c40e694d6..11b8fafa5 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to set the Suite Bar branding for web diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md index fed7e5cbf..9b7059ee1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for setting web application settings that are diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md index b2f8a0681..6d8436632 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for setting web application settings that are diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md index eb0ffd693..e7a4ac9bc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for creating a web application within the local diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md index ff9d77878..8c53720c9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource will configure the App Domain at a specific zone for the given diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md index f3ecb1f7c..2e0c968eb 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is responsible for extending an existing web application into a new diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md index 0777929b3..91ff6608e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description The resource is able to provision, unprovision and configure the Word diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md index 3cbd643c9..f9f24fda6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to provision and manage an instance of the Work diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md index 6ffc263e7..bbfc05e3c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md @@ -1,3 +1,7 @@ +# Type + +Distributed + # Description This resource is used to register the SharePoint Server From a41e156edc64cc6466220d496e98ccd7fee13dde Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 13 Apr 2018 07:40:08 -0400 Subject: [PATCH 22/56] Fixed ChangeLog markdown error --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9468a6231..0b3f1f0ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Change log for SharePointDsc ## Unreleased + * All Resources * Added information about the Resource Type in each ReadMe.md files. * SPTrustedIdentityTokenIssuerProviderRealms From 7f028cc15b4ff59add931c11dbb4c73811098056 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 13 Apr 2018 08:59:39 -0400 Subject: [PATCH 23/56] Test markup --- .../DSCResources/MSFT_SPAccessServiceApp/readme.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md index 1c0174bd9..d4ffc740e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +** Type: ** Distributed + This resource is responsible for creating Access Services Application instances within the local SharePoint farm. The resource will provision and configure the Access Services Service Application. From f9319cffad5f8b4e7f07aea99ea3e2153c30172a Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 13 Apr 2018 09:02:55 -0400 Subject: [PATCH 24/56] Test bold --- .../DSCResources/MSFT_SPAccessServiceApp/readme.md | 2 +- .../DSCResources/MSFT_SPAlternateUrl/readme.md | 6 ++---- .../DSCResources/MSFT_SPAntivirusSettings/readme.md | 6 ++---- .../SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md | 6 ++---- .../SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md | 6 ++---- .../DSCResources/MSFT_SPAppManagementServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPAppStoreSettings/readme.md | 6 ++---- .../DSCResources/MSFT_SPBCSServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPBlobCacheSettings/Readme.md | 6 ++---- .../DSCResources/MSFT_SPCacheAccounts/Readme.md | 6 ++---- .../DSCResources/MSFT_SPConfigWizard/readme.md | 6 ++---- 11 files changed, 21 insertions(+), 41 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md index d4ffc740e..a870cdfa7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md @@ -1,6 +1,6 @@ # Description -** Type: ** Distributed +**Type:** Distributed This resource is responsible for creating Access Services Application instances within the local SharePoint farm. The resource will provision and configure the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md index a3f0916e0..115f7e838 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to define an alternate access mapping URL for a specified web application. These can be assigned to specific zones for each web application. Alternatively a URL can be removed from a zone to ensure that it diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md index 395d25740..2c590131d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to set the global antivirus settings for the local farm. These settings will be used to control the behavior of an external anti-virus scanning tool that is able to integrate with SharePoint. Note that this will diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md index 57e541c88..41df77d02 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will ensure that a specific site collection is marked as the app catalog for the web application that the site is in. The catalog site needs to have been created using the correct template (APPCATALOG#0). diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md index c80f2769a..6e2732eb1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will set the value for the app domain settings at the farm level. You can set the domain name and the prefix that is to be used for app URLs. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md index c8ad0d534..4e6f83faa 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to provision and manage an instance of the App Management Services Service Application. It will identify an instance of the app management service application through the application display name. Currently diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md index 63a1855d2..79f6faa4f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will configure the ability to purchase apps for both SharePoint and Office apps. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md index edebb36bc..6fa6ee30a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to provision and manage an instance of the Business Connectivity Services Service Application. It will identify an instance of the BCS app through the application display name. Currently the resource diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md index 3a953cc82..844406ba6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md @@ -1,9 +1,7 @@ -# Type - -Specific - # Description +**Type:** Specific + This resource is used to configure the Blob Cache settings for a web application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md index 0d327ffa8..d538b5d08 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to set the "super user" and "super reader" cache accounts for the specified web application object (as described in the TechNet article [Configure object cache user accounts in SharePoint Server 2013](https://technet.microsoft.com/en-us/library/ff758656.aspx)). diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md index b53e3787b..5c45d53cd 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md @@ -1,9 +1,7 @@ -# Type - -Utility - # Description +**Type:** Utility + This resource is used to perform the upgrade step of installing SharePoint updates, like Cumulative Updates, Service Packs and Language Packs. The DatabaseUpgradeDays and DatabaseUpgradeTime parameters specify a window in From 4da0b30fba6412eb3444f8501077595b36ab9fdb Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 13 Apr 2018 09:48:37 -0400 Subject: [PATCH 25/56] All strong Type conversion --- .../DSCResources/MSFT_SPContentDatabase/Readme.md | 6 ++---- .../SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md | 6 ++---- .../DSCResources/MSFT_SPDesignerSettings/Readme.md | 6 ++---- .../DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md | 6 ++---- .../DSCResources/MSFT_SPDiagnosticsProvider/readme.md | 6 ++---- .../MSFT_SPDistributedCacheClientSettings/Readme.md | 6 ++---- .../DSCResources/MSFT_SPDistributedCacheService/Readme.md | 6 ++---- .../DSCResources/MSFT_SPExcelServiceApp/Readme.md | 6 ++---- Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md | 6 ++---- .../DSCResources/MSFT_SPFarmAdministrators/Readme.md | 6 ++---- .../DSCResources/MSFT_SPFarmPropertyBag/readme.md | 6 ++---- .../DSCResources/MSFT_SPFarmSolution/Readme.md | 6 ++---- Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md | 6 ++---- .../DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md | 6 ++---- .../MSFT_SPInfoPathFormsServiceConfig/readme.md | 6 ++---- Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md | 6 ++---- .../DSCResources/MSFT_SPInstallLanguagePack/Readme.md | 6 ++---- .../DSCResources/MSFT_SPInstallPrereqs/Readme.md | 6 ++---- .../SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md | 6 ++---- .../SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md | 6 ++---- .../MSFT_SPMachineTranslationServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPManagedAccount/readme.md | 6 ++---- .../DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md | 6 ++---- .../MSFT_SPManagedMetadataServiceAppDefault/readme.md | 6 ++---- .../SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md | 6 ++---- .../DSCResources/MSFT_SPMinRoleCompliance/readme.md | 6 ++---- .../DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md | 6 ++---- .../DSCResources/MSFT_SPOutgoingEmailSettings/readme.md | 6 ++---- .../DSCResources/MSFT_SPPasswordChangeSettings/readme.md | 6 ++---- .../MSFT_SPPerformancePointServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPProductUpdate/readme.md | 6 ++---- .../MSFT_SPProjectServerADResourcePoolSync/readme.md | 6 ++---- .../MSFT_SPProjectServerAdditionalSettings/readme.md | 6 ++---- .../MSFT_SPProjectServerGlobalPermissions/readme.md | 6 ++---- .../DSCResources/MSFT_SPProjectServerGroup/readme.md | 6 ++---- .../DSCResources/MSFT_SPProjectServerLicense/readme.md | 6 ++---- .../MSFT_SPProjectServerPermissionMode/readme.md | 6 ++---- .../DSCResources/MSFT_SPProjectServerServiceApp/readme.md | 6 ++---- .../MSFT_SPProjectServerTimeSheetSettings/readme.md | 6 ++---- .../MSFT_SPProjectServerUserSyncSettings/readme.md | 6 ++---- .../DSCResources/MSFT_SPProjectServerWssSettings/readme.md | 6 ++---- .../DSCResources/MSFT_SPPublishServiceApplication/readme.md | 6 ++---- .../DSCResources/MSFT_SPQuotaTemplate/readme.md | 6 ++---- .../DSCResources/MSFT_SPRemoteFarmTrust/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchAuthoritativePage/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchContentSource/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchCrawlMapping/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchCrawlRule/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchFileType/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchIndexPartition/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchResultSource/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPSearchTopology/readme.md | 6 ++---- .../DSCResources/MSFT_SPSecureStoreServiceApp/readme.md | 6 ++---- .../MSFT_SPSecurityTokenServiceConfig/readme.md | 6 ++---- .../DSCResources/MSFT_SPServiceAppPool/readme.md | 6 ++---- .../DSCResources/MSFT_SPServiceAppProxyGroup/readme.md | 6 ++---- .../DSCResources/MSFT_SPServiceAppSecurity/readme.md | 6 ++---- .../DSCResources/MSFT_SPServiceIdentity/readme.md | 6 ++---- .../DSCResources/MSFT_SPServiceInstance/readme.md | 6 ++---- .../DSCResources/MSFT_SPSessionStateService/readme.md | 6 ++---- .../SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md | 6 ++---- Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md | 6 ++---- .../DSCResources/MSFT_SPStateServiceApp/readme.md | 6 ++---- .../MSFT_SPSubscriptionSettingsServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPTimerJobState/readme.md | 6 ++---- .../MSFT_SPTrustedIdentityTokenIssuer/readme.md | 6 ++---- .../readme.md | 6 ++---- .../DSCResources/MSFT_SPUsageApplication/readme.md | 6 ++---- .../DSCResources/MSFT_SPUserProfileProperty/readme.md | 6 ++---- .../DSCResources/MSFT_SPUserProfileSection/readme.md | 6 ++---- .../DSCResources/MSFT_SPUserProfileServiceApp/readme.md | 6 ++---- .../MSFT_SPUserProfileServiceAppPermissions/readme.md | 6 ++---- .../DSCResources/MSFT_SPUserProfileSyncConnection/readme.md | 6 ++---- .../DSCResources/MSFT_SPUserProfileSyncService/readme.md | 6 ++---- .../DSCResources/MSFT_SPVisioServiceApp/readme.md | 6 ++---- Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppAuthentication/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppGeneralSettings/readme.md | 6 ++---- .../MSFT_SPWebAppPeoplePickerSettings/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppPermissions/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppPolicy/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppProxyGroup/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppSuiteBar/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebApplication/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebApplicationAppDomain/readme.md | 6 ++---- .../DSCResources/MSFT_SPWebApplicationExtension/readme.md | 6 ++---- .../DSCResources/MSFT_SPWordAutomationServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPWorkManagementServiceApp/readme.md | 6 ++---- .../DSCResources/MSFT_SPWorkflowService/readme.md | 6 ++---- 95 files changed, 190 insertions(+), 380 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md index d539cd96a..ecd15c96e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to add and remove Content Databases to web applications and configure these databases. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md index 3d3d90f90..c66256bae 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will allow specifying which SQL Server AlwaysOn Availability group a resource should be in. This resource does not configure the Availability Groups on SQL Server, they must already exist. It simply adds diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md index 029eddf82..cdc08df96 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to set the SharePoint Designer settings for the local farm or site collections. These settings will be used to control if users are allowed to make changes using SharePoint Designer. Note that this will not diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md index 983f615b1..51abc1eb9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for configuring settings to do with the diagnostic (ULS) logging on servers in the farm. These settings are applied to the diagnostic logging service for the farm and do not need to be applied to each diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md index 618873d09..e20764f95 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for configuring the Diagnostics Provider within the local SharePoint farm. Using Ensure equals to Absent is not supported. This resource can only apply configuration, not ensure they don't exist. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md index 4c996188e..28b1a3812 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for configuring the distributed cache client settings. It only accepts Ensure='Present' as a key. The resource can configure the following cache components: DistributedLogonTokenCache, diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md index d6fd9568a..4632417d4 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md @@ -1,9 +1,7 @@ -# Type - -Specific - # Description +**Type:** Specific + This resource is responsible for provisioning the distributed cache to the service it runs on. This is required in your farm on at least one server (as the behavior of SPCreateFarm and SPJoinFarm is to not enroll every server as a diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md index c9bb145cc..bef4f2da8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for creating Excel Services Application instances within the local SharePoint farm. The resource will provision and configure the Excel Services Service Application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md index 3b34db3cc..46cd82bf3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md @@ -1,9 +1,7 @@ -# Type - -Common - # Description +**Type:** Common + This resource is used to create a new SharePoint farm and allow servers to join that farm. It will detect the presence of the configuration database on the SQL server as a first step, and if it does not exist then the farm diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md index 94d0f15df..eb2669550 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Common + This resource is used to manage the membership of the farm administrators group. There are a number of approaches to how this can be implemented. The "members" property will set a specific list of members for the group, making diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md index 6d9fd4391..c715d8fe9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to work with SharePoint Property Bags at the farm level. The account that runs this resource must be a farm administrator. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md index ca45b116b..65ffe33a7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to make sure that a specific farm solution is either present or absent in a farm. The solution can be deployed to one or more web application passing an array of URL's to the WebApplications property. If the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md index d086e0ce4..716eef156 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to make sure that a specific feature is either enabled or disabled at a given URL/scope. The Ensure property will dictate if the feature should be on or off. The name property is the name of the feature diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md index 8d17e7502..36742b1de 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to configure Health Analyzer rules for the local farm. The resource is able to enable/disable and configure the specified rule. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md index e5a7eaa48..496785e62 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for configuring the InfoPath Forms service within the local SharePoint farm. Using Ensure equals to Absent is not supported. This resource can only apply configuration, not ensure they don't exist. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md index 5a2c3627c..6eadc058a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md @@ -1,9 +1,7 @@ -# Type - -Common - # Description +**Type:** Common + This resource is used to install the SharePoint binaries. The BinaryDir parameter should point to the path that setup.exe is located (not to setup.exe itself). The ProductKey parameter is used to inject in to the configuration diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md index 822e65de8..fc28cb5a7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md @@ -1,9 +1,7 @@ -# Type - -Common - # Description +**Type:** Distributed + This resource is used to install the SharePoint Language Pack binaries. The BinaryDir parameter should point to the path that setup.exe is located (not to setup.exe itself). diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md index b2a044ddb..87e188ac3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md @@ -1,9 +1,7 @@ -# Type - -Common - # Description +**Type:** Common + This resource is responsible for ensuring the installation of all SharePoint prerequisites. It makes use of the PrerequisiteInstaller.exe file that is part of the SharePoint binaries, and will install the required Windows features as diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md index 1975f06a8..2e2ae6f2b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to manipulate the IRM settings in SharePoint, integrating it with AD RMS diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md index a26b13639..c1a8d5c2d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to change the minimum severity of events captured in the trace logs (ULS logs) and the Windows event logs. Settings can be changed globally for all areas and categories (using the '*' character as the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md index 071ecf6b7..9aa39c06b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to provision and manage an instance of the Machine Translation Service Application. It will identify an instance of the MT app through the application display name. Currently the resource will diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md index 5b33dc06f..30b3d9cc2 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will ensure a managed account is provisioned in to the SharePoint farm. The Account object specific the credential to store (including username and password) to set as the managed account. The settings for diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md index 289c38de7..1283f8583 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + Creates a managed metadata service application. The application pool property specifies which application pool it should use, and will reset the application back to this pool if it is changed after its initial provisioning. The diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md index 124f3f9fa..15de4750b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + Using several managed metadata service instances in a farm requires some configuration, which service application proxy should be used as default for keywords or site collection specific term sets. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md index c863b1fb2..fa8c37b6d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for creating managed paths associated with a specific web application. The WebAppUrl parameter is used to specify the web application to create the path against, and the RelativeUrl parameter lets you diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md index 02e6fdafb..7eac25dd8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md @@ -1,9 +1,7 @@ -# Type - -Utility - # Description +**Type:** Utility + This resource will help manage compliance of MinRole based servers. Each time the resource runs it will investigate which service instances should be running based on the role of servers anywhere in the farm, and if they are not in a diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md index dc2f22bd8..8509e0cdf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will create a binding to an Office Online Server (formerly known as Office Web Apps). The DnsName property can be a single server name, or a FQDN of a load balanced end point that will direct traffic to a farm. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md index 6cc7f6474..31a3f1ccc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to set the outgoing email settings for either a single web application, or the whole farm. To configure the resource for a specific web app, use the URL of the web application for the WebAppUrl property, to diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md index b72a25d97..2aa70c084 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to control settings that relate to the automatic changing of passwords for managed accounts (where they opt-in to be managed by SharePoint). These settings can be manually controlled through central diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md index 73a4bf14f..c82e7773c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for creating Performance Point Service Application instances within the local SharePoint farm. The resource will provision and configure the Performance Point Service Application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md index 5b647b8a9..24c133a51 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md @@ -1,9 +1,7 @@ -# Type - -Common - # Description +**Type:** Common + This resource is used to perform the update step of installing SharePoint updates, like Cumulative Updates and Service Packs. The SetupFile parameter should point to the update file. The ShutdownServices parameter is used to diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md index 78831590d..a79782aa6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to control the settings of the Active Directory resource pool sync for Project Server, for a specific PWA instance. You can control which AD groups should be imported from and control diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md index 17044c6d3..1e9e84a24 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to manage the "additional settings" for a PWA instance (based on what is in the 'additional settings' page of the web interface). diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md index b6017e85a..e1ca0a8ac 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource allows you to enforce global permissions in a PWA site for a specific project server group or an individual resource. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md index 7ebf28b31..37c077dfa 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to configure a group within Project Server. This is only available for use when the site is configured to use Project Server permissions mode and for Project Server 2016 only. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md index 468b0527a..b413b9494 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to enable a Project Server license in to a SharePoint 2016 farm. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md index 67be060be..c9939c57b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource allows you to set the permissions mode (either SharePoint or ProjectServer) for a specific project server site. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md index 817f8624c..5b1784eb0 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for provisioning and managing the Project Server service application in SharePoint Server 2016. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md index 90fc8b7b3..ca26f8c18 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + Allows you to configure the default timesheet settings for a specific PWA instance. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md index 1a36a07b1..15a73bb6a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md @@ -1,8 +1,6 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for configuration of the user sync settings between projects and project sites. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md index 31e7eeae2..f04d6749e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to control settings that relate to the SharePoint sites that are linked to projects in Project Server. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md index f740ba0e6..462dbfc17 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to specify if a specific service application should be published (Ensure = "Present") or not published (Ensure = "Absent") on the current server. The name is the display name of the service application as diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md index 3afdb51ea..99e56b6fa 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to configure quota templates in the farm. These settings will be used to make sure a certain quota template exists or not. When it exists, it will also make sure the settings are configured as specified. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md index 4dbd46c29..a05c09641 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to trust a remote SharePoint farm. This is used when federating search results between two different SharePoint farms. The technique is described at diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md index c3d8e8ecb..dd6fa7e35 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for managing the search authoritative pages in the search service application. You can create new pages, change existing pages and remove existing pages. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md index baeb39da4..30d452cf3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will deploy and configure a content source in a specified search service application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md index 09f67741b..7e7dab770 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for managing the search crawl mapping in the search service application. You can create new mappings, change existing mappings and remove existing mappings. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md index 2441ab81e..18f97cfd3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for managing the search crawl rules in the search service application. You can create new rules, change existing rules and remove existing rules. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md index bb76bd562..4e971d332 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for managing the search crawl impact rules in the search service application. You can create new rules, change existing rules and remove existing rules. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md index e7c494866..53de58caf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for managing the search file types in the search service application. You can create new file types, change existing types and remove existing file types. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md index a1bcac100..7d3c738e6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for creating search indexes. It works by creating the index topology components and updating the topology from the server that runs this resource. For this reason this resource only needs to run from one diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md index bcf2bfd5b..fbff9dd27 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to configure search result sources in the SharePoint search service application. Result sources can be configured to be of the following provider types: diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md index 7bbd4d2a8..866e5e932 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for provisioning the search service application. The current version lets you specify the database name and server, as well as the application pool. If the application pool is changed the DSC resource will diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md index de6f91e6b..b66cb5d14 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for provisioning a search topology in to the current farm. It allows the configuration to dictate the search topology roles that the current server should be running. Any combination of roles can be diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md index 55cb7983b..038b7c1cf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for provisioning and configuring the secure store service application. The parameters passed in (except those related to database specifics) are validated and set when the resource is run, the database values diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md index 81b77a1de..b99197f1f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for configuring the Security Token Service within the local SharePoint farm. Using Ensure equals to Absent is not supported. This resource can only apply configuration, not ensure they don't exist. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md index f12a4486a..42338bbb5 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used for provisioning an application pool that can be used for service applications. The account used for the service account must already be registered as a managed account (which can be provisioned through diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md index d680fccf6..7e9cffd79 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to manage SharePoint Service Application Proxy Groups. The "Ensure" parameter controls whether or not the Proxy Group should exist. A proxy group cannot be removed if a web application is using it. The diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md index 73a810479..d87606891 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to manage the sharing security settings of a specific service application. There are a number of approaches to how this can be implemented. Firstly you can set permissions for the app administrators, or diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md index b7972dc43..8774fef49 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to specify a managed account to be used to run a service instance. You can also specify LocalService, LocalSystem or NetworkService as ManagedAccount. The name is the typename of the service as shown in the Central Admin website. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md index 36b222783..9c3c5935e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md @@ -1,9 +1,7 @@ -# Type - -Specific - # Description +**Type:** Specific + This resource is used to specify if a specific service should be running (Ensure = "Present") or not running (Ensure = "Absent") on the current server. The name is the display name of the service as shown in the Central Admin diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md index d538feee0..c09baefb5 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will provision a state service app to the local farm. Specify the name of the database server and database name to provision the app with, and optionally include the session timeout value. If session timeout is not diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md index 58fff5078..979611faf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to manage the users with Shell Admin permissions. There are a number of approaches to how this can be implemented. The "Members" property will set a specific list of members for the group, making sure that diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md index 9a2f8da13..d6275a939 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will provision a site collection to the current farm, based on the settings that are passed through. These settings map to the New-SPSite cmdlet and accept the same values and types. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md index 077ce096a..85ebe3788 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource provisions an instance of the state service in to the local farm. The database specific parameters are only used during initial provisioning of the app, and will not change database settings beyond the initial deployment. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md index 23f2dffcb..6b3e95660 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to provision and manage an instance of the App Management Services Service Application. It will identify an instance of the subscription settings service app through the application display name. Currently the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md index 363f8e988..cd772c126 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to configure a timer job and make sure it is in a specific state. The resource can be used to enable or disabled the job and configure the schedule of the job. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md index 84f6930e3..21b24c97f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to create or remove SPTrustedIdentityTokenIssuer in a SharePoint farm. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md index f4b816fc1..fc4a2139b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to add or remove provider realms to SPTrustedIdentityTokenIssuer in a SharePoint farm. The "ProviderRealms" property will set a specific list of realms, making sure diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md index a69c637de..4a517ac12 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource provisions an instance of the usage and health monitoring service application. The database settings are only used for initial provisioning, but the usage settings can be changed and will be enforced as the resource is diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md index 058c4c13d..12a3056c6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will create a property in a user profile service application. It creates, update or delete a property using the parameters that are passed in to it. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md index a853a000d..b6dfc87ae 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will create a section in a user profile service application. It creates, update or delete a section using the parameters that are passed in to it. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md index 1846e4d2e..86ba9f9c9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will provision an instance of the user profile service to the farm. It creates the required databases using the parameters that are passed in to it (although these are only used during the initial provisioning). diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md index d77968e15..d37ca6885 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will apply permissions to a user profile service application. These can control access to create my sites, use social features, and use tagging. If you want to allow all users the ability to use a specific diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md index dc8e2343f..0a421a684 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will ensure a specifc user profile sync connection is in place and that it is configured accordingly to its definition diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md index d0863a67f..4c4d74a5c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md @@ -1,9 +1,7 @@ -# Type - -Specific - # Description +**Type:** Specific + This resource is responsible for ensuring that the user profile sync service has been provisioned (Ensure = "Present") or is not running (Ensure = "Absent") on the current server. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md index 0c187bc1e..cfdf41eb4 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for creating Visio Graphics Service Application instances within the local SharePoint farm. The resource will provision and configure the Visio Graphics Service Application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md index 242e60ae0..267226221 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will provision a SPWeb based on the settings that are passed through. These settings map to the New-SPWeb cmdlet and accept the same values diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md index 11bd84bfc..a197bba25 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for configuring the authentication on a web application within the local SharePoint farm. The resource is able to configure the five available zones (if they exist) separately and each diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md index 271f8f431..cef31b3c5 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for controlling the blocked file type setting on a specific web application. It has two modes of operation, the first is to use the "blocked" property, where you are able to define a specific list of file diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md index 511e3871b..1aad9058a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for setting web application settings that are found under the "general settings" screen in central admin. The web application is specified through the URL property, and then any combination of diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md index f52de7fa8..589f28b5e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to configure the People Picker settings for a web application. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md index 1bb147b9d..077e5dfb6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for managing the user permissions for a web application. You can either specify to set all permissions or specify individual permissions per category. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md index f225b3043..ae5142289 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to set the User Policies for web applications. The usernames can be either specified in Classic or Claims format, both will be accepted. There are a number of approaches to how this can be implemented. The diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md index 5358dbfc8..96c6b83f0 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to associate a web application to a service application proxy group. Use the proxy group name "Default" to associate the web application to the default proxy group. A web applicaiton can only connect to diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md index a0a59e376..256312c93 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for controlling the Site Use and Deletion settings on a specific web application. You can enable or disable the Site Use and Deletion feature, specify the amount of days after which the alerts are diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md index 11b8fafa5..8d926aa3b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to set the Suite Bar branding for web applications. It supports both the SharePoint 2013 and SharePoint 2016 ways of branding the suite bar. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md index 9b7059ee1..37fdec3b7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for setting web application settings that are found under the "resource throttling" screen in central admin. The web application is specified through the URL property, and then any combination of diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md index 6d8436632..00b2533d7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for setting web application settings that are found under the "workflow settings" screen in central admin. The web application is specified through the URL property, and then any combination of diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md index e7a4ac9bc..32f794a08 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for creating a web application within the local SharePoint farm. The resource will provision the web application with all of the current settings, and then ensure that it stays part of the correct diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md index 8c53720c9..89f9625af 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource will configure the App Domain at a specific zone for the given Web Application. The configuration is done per zone on the specified web application, allowing for the setting of unique app domains for each extension diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md index 2e0c968eb..eba0b6a38 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is responsible for extending an existing web application into a new zone. The resource will provision the web application extension with all of the current settings, and then ensure that it stays present and will ensure the diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md index 91ff6608e..485c4daf1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + The resource is able to provision, unprovision and configure the Word Automation Service Application. All settings that you can configure on the Service Application administration page are configurable using this resource. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md index f9f24fda6..47946fd97 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to provision and manage an instance of the Work Management Services Service Application. It will identify an instance of the work management service application through the application display name. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md index bbfc05e3c..1a16a7bb9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md @@ -1,9 +1,7 @@ -# Type - -Distributed - # Description +**Type:** Distributed + This resource is used to register the SharePoint Server against a Workflow Manager Instance. From bf686365271ade4b3268f22ffa7c0c2abff5f1b1 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Sat, 14 Apr 2018 09:32:24 -0400 Subject: [PATCH 26/56] SPFarm actually needs to be flagged as a Specific Resource, not common --- Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md index 46cd82bf3..6058dae3e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md @@ -1,6 +1,6 @@ # Description -**Type:** Common +**Type:** Specific This resource is used to create a new SharePoint farm and allow servers to join that farm. It will detect the presence of the configuration database From e1d7566535c2f1626500c067804c1fa77183af85 Mon Sep 17 00:00:00 2001 From: Christoph Vollmann Date: Fri, 11 May 2018 12:22:28 +0200 Subject: [PATCH 27/56] Fix: Timer jobs rolled out to multiple web applications could not be configured The variable used in Get-SPTimerJob for the web application was never set. --- .../DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 index 53d3b4a43..f3b4bf0f7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 @@ -160,7 +160,7 @@ function Set-TargetResource } $timerjob = Get-SPTimerJob -Type $params.TypeName ` - -WebApplication $webapp + -WebApplication $wa if ($timerjob.Count -eq 0) { From 7b600a756ab75e2ccc5f6935e88480712009b500 Mon Sep 17 00:00:00 2001 From: Christoph Vollmann Date: Fri, 11 May 2018 13:05:01 +0200 Subject: [PATCH 28/56] The variable already set with the webapplication is used as parameter --- .../DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 index f3b4bf0f7..d35893ec7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 @@ -61,7 +61,7 @@ function Get-TargetResource } $timerjob = Get-SPTimerJob -Type $params.TypeName ` - -WebApplication $params.WebAppUrl + -WebApplication $wa if ($timerjob.Count -eq 0) { From a7b8ac2a976ca5886dffe01a00cd07f8ca1133ea Mon Sep 17 00:00:00 2001 From: Christoph Vollmann Date: Fri, 11 May 2018 13:18:24 +0200 Subject: [PATCH 29/56] Added entry to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3f1f0ad..5907bc685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ * Added the resource. * SPUserProfileServiceApp * Now supported specifying the host Managed path, and properly sets the host. +* SPTimerJobState + * Fixed issue where the Set method for timerjobs deployed to multiple web + applications failed. ## 2.2 From 087a961deb7875bfc0ea9da0a874151351ffdb50 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Thu, 24 May 2018 21:38:09 +0200 Subject: [PATCH 30/56] Fixed several issues in SPFarm and SPUPSSyncConnections --- .../DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 | 14 +- .../MSFT_SPUserProfileSyncConnection.psm1 | 176 +++++++++++++++--- ...SFT_SPUserProfileSyncConnection.schema.mof | 4 +- 3 files changed, 170 insertions(+), 24 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 index ef82642b9..4a516a2d9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 @@ -83,7 +83,6 @@ function Get-TargetResource } } - if (($PSBoundParameters.ContainsKey("ServerRole") -eq $true) ` -and $installedVersion.FileMajorPart -ne 16) { @@ -186,11 +185,22 @@ function Get-TargetResource $installedVersion = Get-SPDSCInstalledProductVersion if($installedVersion.FileMajorPart -eq 16) { - $server = Get-SPServer -Identity $env:COMPUTERNAME + $server = Get-SPServer -Identity $env:COMPUTERNAME -ErrorAction SilentlyContinue if($null -ne $server -and $null -ne $server.Role) { $returnValue.Add("ServerRole", $server.Role) } + else + { + $domain = (Get-CimInstance -ClassName Win32_ComputerSystem).Domain + $currentServer = "$($env:COMPUTERNAME).$domain" + + $server = Get-SPServer -Identity $currentServer -ErrorAction SilentlyContinue + if($null -ne $server -and $null -ne $server.Role) + { + $returnValue.Add("ServerRole", $server.Role) + } + } } return $returnValue } diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index f9d6b0ee9..ee1c3116f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -32,6 +32,10 @@ function Get-TargetResource [System.String] $Server, + [Parameter()] + [System.UInt32] + $Port = 389, + [Parameter()] [System.Boolean] $Force, @@ -40,6 +44,10 @@ function Get-TargetResource [System.Boolean] $UseSSL, + [Parameter()] + [System.Boolean] + $UseDisabledFilter, + [Parameter()] [ValidateSet("ActiveDirectory","BusinessDataCatalog")] [System.String] @@ -82,44 +90,102 @@ function Get-TargetResource { $BINDING_FLAGS = ([System.Reflection.BindingFlags]::NonPublic -bOr [System.Reflection.BindingFlags]::Instance) $adImportNamespace = [Microsoft.Office.Server.UserProfiles.ActiveDirectoryImportConnection] - $METHOD_GET_NAMINGCONTEXTS = $adImportNamespace::GetMethod("get_NamingContexts", $BINDING_FLAGS) - $METHOD_GET_ACCOUNTUSERNAME = $adImportNamespace::GetMethod("get_AccountUsername", $BINDING_FLAGS) - $METHOD_GET_ACCOUNTDOMAIN = $adImportNamespace::GetMethod("get_AccountDomain", $BINDING_FLAGS) - $METHOD_GET_USESSL = $adImportNamespace::GetMethod("get_UseSSL", $BINDING_FLAGS) + $METHOD_GET_NAMINGCONTEXTS = $adImportNamespace.GetMethod("get_NamingContexts", $BINDING_FLAGS) + $METHOD_GET_ACCOUNTUSERNAME = $adImportNamespace.GetMethod("get_AccountUsername", $BINDING_FLAGS) + $METHOD_GET_ACCOUNTDOMAIN = $adImportNamespace.GetMethod("get_AccountDomain", $BINDING_FLAGS) + $METHOD_GET_USEDISABLEDFILTER = $adImportNamespace.GetMethod("get_UseDisabledFilter", $BINDING_FLAGS) + $METHOD_GET_USESSL = $adImportNamespace.GetMethod("get_UseSSL", $BINDING_FLAGS) $namingContexts = $METHOD_GET_NAMINGCONTEXTS.Invoke($connection, $null) $accountName = $METHOD_GET_ACCOUNTUSERNAME.Invoke($connection, $null) $accountDomain = $METHOD_GET_ACCOUNTDOMAIN.Invoke($connection, $null) $accountCredentials = $accountDomain + "\" + $accountName + $useDisabledFilter = $METHOD_GET_USEDISABLEDFILTER.Invoke($connection, $null) $useSSL = $METHOD_GET_USESSL.Invoke($connection, $null) if($null -eq $namingContexts) { - return $null + return @{ + Name = $params.Name + UserprofileService = $null + Forest = $null + Credentials = $null + IncludedOUs = $null + ExcludedOUs = $null + Server = $null + Port = $null + UseSSL = $null + UseDisabledFilter = $null + ConnectionType = $null + Force = $null + } + } + + if ($null -eq $namingContexts.ContainersIncluded) + { + $inclOUs = $null + } + else + { + $inclOUs = @($namingContexts.ContainersIncluded) + } + + if ($null -eq $namingContexts.ContainersExcluded) + { + $exclOUs = $null + } + else + { + $exclOUs = @($namingContexts.ContainersExcluded) } return @{ - UserprofileService = $UserProfileService + Name = $params.Name + UserprofileService = $params.UserProfileService Forest = $namingContexts.DistinguishedName - Credentials = $accountCredentials - IncludedOUs = $namingContext.ContainersIncluded - ExcludedOUs = $namingContext.ContainersExcluded + ConnectionCredentials = $accountCredentials + IncludedOUs = @($namingContexts.ContainersIncluded) + ExcludedOUs = @($namingContexts.ContainersExcluded) Server = $null + Port = $params.Port UseSSL = $useSSL - ConnectionType = $conn.Type + UseDisabledFilter = $useDisabledFilter + ConnectionType = $connection.Type -replace "Import","" Force = $params.Force } } + $accountCredentials = "$($connection.AccountDomain)\$($connection.AccountUsername)" $domainController = $namingContext.PreferredDomainControllers | Select-Object -First 1 + + if ($null -eq $namingContext.ContainersIncluded) + { + $inclOUs = $null + } + else + { + $inclOUs = @($namingContext.ContainersIncluded) + } + + if ($null -eq $namingContext.ContainersExcluded) + { + $exclOUs = $null + } + else + { + $exclOUs = @($namingContext.ContainersExcluded) + } + return @{ - UserProfileService = $UserProfileService + UserProfileService = $params.UserProfileService Forest = $connection.Server Name = $namingContext.DisplayName - Credentials = $accountCredentials - IncludedOUs = $namingContext.ContainersIncluded - ExcludedOUs = $namingContext.ContainersExcluded - Server =$domainController + ConnectionCredentials = $accountCredentials + IncludedOUs = $inclOUs + ExcludedOUs = $exclOUs + Server = $domainController UseSSL = $connection.UseSSL + UseDisabledFilter = $connection.UseDisabledFilter + Port = $params.Port ConnectionType = $connection.Type.ToString() Force = $params.Force } @@ -161,6 +227,10 @@ function Set-TargetResource [System.String] $Server, + [Parameter()] + [System.UInt32] + $Port = 389, + [Parameter()] [System.Boolean] $Force, @@ -169,6 +239,10 @@ function Set-TargetResource [System.Boolean] $UseSSL, + [Parameter()] + [System.Boolean] + $UseDisabledFilter, + [Parameter()] [ValidateSet("ActiveDirectory","BusinessDataCatalog")] [System.String] @@ -181,6 +255,47 @@ function Set-TargetResource Write-Verbose -Message "Setting user profile service sync connection $Name" + if ($PSBoundParameters.ContainsKey("UseSSL") -eq $false) + { + Write-Verbose -Message "UseSSL is not specified. Assuming that SSL is not required." + $PSBoundParameters.UseSSL = $false + } + else + { + if ($UseSSL -eq $true -and $PSBoundParameters.ContainsKey("Port") -eq $false) + { + Write-Verbose -Message ("UseSSL is set to True, but no port is specified. Assuming " + ` + "that port 636 (default LDAPS port) is to be used.") + $PSBoundParameters.Port = 636 + } + } + + $installedVersion = Get-SPDSCInstalledProductVersion + if ($PSBoundParameters.ContainsKey("Port") -eq $false) + { + $PSBoundParameters.Port = $Port + } + else + { + if ($installedVersion.FileMajorPart -eq 15) + { + Write-Verbose -Message "NOTE: The Port parameter is not used in SharePoint 2013." + } + } + + if ($PSBoundParameters.ContainsKey("UseDisabledFilter") -eq $false) + { + Write-Verbose -Message ("UseDisabledFilter is not specified. Assuming that disabled " + ` + "accounts should not be filtered.") + $PSBoundParameters.UseDisabledFilter = $false + } + else + { + if ($installedVersion.FileMajorPart -eq 15) + { + } + } + Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments @($PSBoundParameters, $PSScriptRoot) ` -ScriptBlock { @@ -310,7 +425,8 @@ function Set-TargetResource switch($installedVersion.FileMajorPart) { - 15{ + 15 + { $upcm.ConnectionManager.AddActiveDirectoryConnection( [Microsoft.Office.Server.UserProfiles.ConnectionType]::ActiveDirectory, ` $params.Name, ` $params.Forest, ` @@ -326,15 +442,25 @@ function Set-TargetResource { foreach($ou in $params.IncludedOUs) { - Add-SPProfileSyncConnection -ProfileServiceApplication $ups -ConnectionForestName $params.Forest -ConnectionDomain $userDomain ` - -ConnectionUserName $userName -ConnectionPassword $params.ConnectionCredentials.Password -ConnectionUseSSL $params.UseSSL ` - -ConnectionSynchronizationOU $ou + Add-SPProfileSyncConnection -ProfileServiceApplication $ups ` + -ConnectionForestName $params.Forest ` + -ConnectionDomain $userDomain ` + -ConnectionUserName $userName ` + -ConnectionPassword $params.ConnectionCredentials.Password ` + -ConnectionUseSSL $params.UseSSL ` + -ConnectionSynchronizationOU $ou ` + -ConnectionPort $params.Port ` + -ConnectionUseDisabledFilter $params.UseDisabledFilter } foreach($ou in $params.ExcludedOUs) { - Remove-SPProfilesyncConnection -ProfileServiceApplication $ups -ConnectionForestName $params.Forest -ConnectionDomain $userDomain ` - -ConnectionUserName $userName -ConnectionPassword $params.ConnectionCredentials.Password -ConnectionSynchronizationOU $ou + Remove-SPProfilesyncConnection -ProfileServiceApplication $ups ` + -ConnectionForestName $params.Forest ` + -ConnectionDomain $userDomain ` + -ConnectionUserName $userName ` + -ConnectionPassword $params.ConnectionCredentials.Password ` + -ConnectionSynchronizationOU $ou } } } @@ -376,6 +502,10 @@ function Test-TargetResource [System.String] $Server, + [Parameter()] + [System.UInt32] + $Port = 389, + [Parameter()] [System.Boolean] $Force, @@ -384,6 +514,10 @@ function Test-TargetResource [System.Boolean] $UseSSL, + [Parameter()] + [System.Boolean] + $UseDisabledFilter, + [Parameter()] [ValidateSet("ActiveDirectory","BusinessDataCatalog")] [System.String] diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof index b47b93fc0..944a1356c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.schema.mof @@ -4,11 +4,13 @@ class MSFT_SPUserProfileSyncConnection : OMI_BaseResource [Key, Description("The name of the connection")] string Name; [Required, Description("The name of the AD forest to read from")] string Forest; [Required, Description("The name of the user profile service that this connection is attached to")] string UserProfileService; - [Required, Description("The credentials to connect to Active Directory with"), EmbeddedInstance("MSFT_Credential")] string ConnectionCredentials; + [Required, Description("The credentials to connect to Active Directory with"), EmbeddedInstance("MSFT_Credential")] string ConnectionCredentials; [Required, Description("A list of the OUs to import users from")] string IncludedOUs[]; [Write, Description("A list of the OUs to ignore users from")] string ExcludedOUs[]; [Write, Description("The specific AD server to connect to")] string Server; + [Write, Description("The specific port to connect to")] uint32 Port; [Write, Description("Should SSL be used for the connection")] boolean UseSSL; + [Write, Description("Should disabled accounts be filtered")] boolean UseDisabledFilter; [Write, Description("Set to true to run the set method on every call to this resource")] boolean Force; [Write, Description("The type of the connection - currently only Active Directory is supported"), ValueMap{"ActiveDirectory","BusinessDataCatalog"}, Values{"ActiveDirectory","BusinessDataCatalog"}] string ConnectionType; [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] string InstallAccount; From 6b9b0a89488450730a2327a38a646c3dd00281b6 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Thu, 24 May 2018 21:38:43 +0200 Subject: [PATCH 31/56] Small updates --- CHANGELOG.md | 9 +++++++++ .../MSFT_SPUserProfileSyncConnection.psm1 | 1 + 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f17d56bff..684336398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change log for SharePointDsc +## Unreleased + +* SPFarm + * Fixed issue where the resource throws an exception if the farm already + exists and the server has been joined using the FQDN (issue 795) +* SPUserProfileSyncConnection + * Added support for filtering disabled users (issue 794) + * Fixed issue where UseSSL was set to true resulted in an error (issue 774) + ## 2.2 * SPAlternateURL diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index ee1c3116f..31eedf5e2 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -293,6 +293,7 @@ function Set-TargetResource { if ($installedVersion.FileMajorPart -eq 15) { + Write-Verbose -Message "NOTE: The UseDisabledFilter parameter is ignored in SharePoint 2013." } } From 76e31844ada1c2bc87b7b9b6604aab974bed6e40 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Thu, 24 May 2018 21:43:44 +0200 Subject: [PATCH 32/56] Updated AppVeyor.yml to comment out WMF 5 image --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e5fa6a074..c4d3b8817 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: 2.3.0.{build} -image: WMF 5 +#image: WMF 5 install: - git clone https://github.com/PowerShell/DscResource.Tests From 003b76617349d4227cb81c304675d3c56b839726 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Fri, 25 May 2018 15:18:54 +0200 Subject: [PATCH 33/56] Removed WMF 5 image line --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c4d3b8817..1dd397448 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,4 @@ version: 2.3.0.{build} -#image: WMF 5 install: - git clone https://github.com/PowerShell/DscResource.Tests From c5e18e73f6c4970fd6c31541cf12862346330d77 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Wed, 23 May 2018 14:43:11 +0200 Subject: [PATCH 34/56] Changes to SharePointDsc - Added a Branches section to the README.md with Codecov and build badges for both master and dev branch. --- CHANGELOG.md | 3 +++ README.md | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5907bc685..2e5b27ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Changes to SharePointDsc + * Added a Branches section to the README.md with Codecov and build badges for + both master and dev branch. * All Resources * Added information about the Resource Type in each ReadMe.md files. * SPTrustedIdentityTokenIssuerProviderRealms diff --git a/README.md b/README.md index e34c35bd3..e92664749 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # SharePointDsc -Build status: [![Build status](https://ci.appveyor.com/api/projects/status/aj6ce04iy5j4qcd4/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/xsharepoint/branch/master) - Discuss SharePointDsc now: [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PowerShell/xSharePoint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) The SharePointDsc PowerShell module (formerly known as xSharePoint) provides @@ -23,6 +21,26 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft. or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +## Branches + +### master + +[![Build status](https://ci.appveyor.com/api/projects/status/aj6ce04iy5j4qcd4/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/SharePointDsc/branch/master) +[![codecov](https://codecov.io/gh/PowerShell/SharePointDsc/branch/master/graph/badge.svg)](https://codecov.io/gh/PowerShell/SharePointDsc/branch/master) + +This is the branch containing the latest release - +no contributions should be made directly to this branch. + +### dev + +[![Build status](https://ci.appveyor.com/api/projects/status/aj6ce04iy5j4qcd4/branch/dev?svg=true)](https://ci.appveyor.com/project/PowerShell/SharePointDsc/branch/dev) +[![codecov](https://codecov.io/gh/PowerShell/SharePointDsc/branch/dev/graph/badge.svg)](https://codecov.io/gh/PowerShell/SharePointDsc/branch/dev) + +This is the development branch +to which contributions should be proposed by contributors as pull requests. +This development branch will periodically be merged to the master branch, +and be released to [PowerShell Gallery](https://www.powershellgallery.com/). + ## Installation To manually install the module, download the source code and unzip the contents From f20edfd11d7de0ab03e005029b9c13ee3bb5cdb7 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Mon, 4 Jun 2018 16:06:06 +0200 Subject: [PATCH 35/56] Updated Pester tests, ready for commit --- .../MSFT_SPUserProfileSyncConnection.psm1 | 70 ++++--- .../SharePointDsc.SPFarm.Tests.ps1 | 181 ++++++++++++------ ...tDsc.SPUserProfileSyncConnection.Tests.ps1 | 171 ++++++++++------- 3 files changed, 276 insertions(+), 146 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index 31eedf5e2..c7d22e523 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -68,9 +68,24 @@ function Get-TargetResource $ups = Get-SPServiceApplication -Name $params.UserProfileService ` -ErrorAction SilentlyContinue + $nullreturn = @{ + Name = $params.Name + UserprofileService = $null + Forest = $null + ConnectionCredentials = $null + IncludedOUs = $null + ExcludedOUs = $null + Server = $null + Port = $null + UseSSL = $null + UseDisabledFilter = $null + ConnectionType = $null + Force = $null + } + if ($null -eq $ups) { - return $null + return $nullreturn } else { @@ -78,12 +93,23 @@ function Get-TargetResource $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` -ArgumentList $context + # In SP2016, the forest name is used as name but the dot is replaced by a dash + $installedVersion = Get-SPDSCInstalledProductVersion + if ($installedVersion.FileMajorPart -eq 16) + { + $Name = $params.Forest -replace "\.", "-" + } + else + { + $Name = $params.Name + } + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name + $_.DisplayName -eq $Name } if ($null -eq $connection) { - return $null + return $nullreturn } $namingContext = $connection.NamingContexts | Select-Object -First 1 if ($null -eq $namingContext) @@ -104,20 +130,7 @@ function Get-TargetResource if($null -eq $namingContexts) { - return @{ - Name = $params.Name - UserprofileService = $null - Forest = $null - Credentials = $null - IncludedOUs = $null - ExcludedOUs = $null - Server = $null - Port = $null - UseSSL = $null - UseDisabledFilter = $null - ConnectionType = $null - Force = $null - } + return $nullreturn } if ($null -eq $namingContexts.ContainersIncluded) @@ -178,7 +191,7 @@ function Get-TargetResource return @{ UserProfileService = $params.UserProfileService Forest = $connection.Server - Name = $namingContext.DisplayName + Name = $params.Name ConnectionCredentials = $accountCredentials IncludedOUs = $inclOUs ExcludedOUs = $exclOUs @@ -270,7 +283,6 @@ function Set-TargetResource } } - $installedVersion = Get-SPDSCInstalledProductVersion if ($PSBoundParameters.ContainsKey("Port") -eq $false) { $PSBoundParameters.Port = $Port @@ -327,8 +339,19 @@ function Set-TargetResource throw "Synchronization is in Progress." } + # In SP2016, the forest name is used as name but the dot is replaced by a dash + $installedVersion = Get-SPDSCInstalledProductVersion + if ($installedVersion.FileMajorPart -eq 16) + { + $Name = $Forest -replace "\.", "-" + } + else + { + $Name = $params.Name + } + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name + $_.DisplayName -eq $Name } | Select-Object -first 1 if ($null -ne $connection -and $params.Forest -ieq $connection.Server) @@ -361,7 +384,7 @@ function Set-TargetResource } else { - Write-Verbose -Message "creating a new connection " + Write-Verbose -Message "Creating a new connection " if ($null -ne $connection -and $params.Forest -ine $connection.Server) { if ($params.ContainsKey("Force") -and $params.Force -eq $true) @@ -533,7 +556,7 @@ function Test-TargetResource $CurrentValues = Get-TargetResource @PSBoundParameters - if ($null -eq $CurrentValues) + if ($null -eq $CurrentValues.UserProfileService) { return $false } @@ -545,8 +568,7 @@ function Test-TargetResource return Test-SPDscParameterState -CurrentValues $CurrentValues ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", - "Forest", + -ValuesToCheck @("Forest", "UserProfileService", "Server", "UseSSL", diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPFarm.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPFarm.Tests.ps1 index bb21f756c..99603db4e 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPFarm.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPFarm.Tests.ps1 @@ -1,7 +1,7 @@ [CmdletBinding()] param( [Parameter()] - [string] + [string] $SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" ` -Resolve) @@ -73,7 +73,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } It "Should return absent from the get method" { - (Get-TargetResource @testParams).Ensure | Should Be "Absent" + (Get-TargetResource @testParams).Ensure | Should Be "Absent" } It "Should return false from the test method" { @@ -115,7 +115,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } It "Should return absent from the get method" { - (Get-TargetResource @testParams).Ensure | Should Be "Absent" + (Get-TargetResource @testParams).Ensure | Should Be "Absent" } It "Should return false from the test method" { @@ -176,15 +176,15 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName "Get-SPWebApplication" -MockWith { return @{ IsAdministrationWebApplication = $true - ContentDatabases = @(@{ - Name = $testParams.AdminContentDatabaseName + ContentDatabases = @(@{ + Name = $testParams.AdminContentDatabaseName }) Url = "http://localhost:9999" } } It "Should return absent from the get method" { - (Get-TargetResource @testParams).Ensure | Should Be "Absent" + (Get-TargetResource @testParams).Ensure | Should Be "Absent" } It "Should return false from the test method" { @@ -228,8 +228,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName "Get-SPWebApplication" -MockWith { return @{ IsAdministrationWebApplication = $true - ContentDatabases = @(@{ - Name = $testParams.AdminContentDatabaseName + ContentDatabases = @(@{ + Name = $testParams.AdminContentDatabaseName }) Url = "http://localhost:9999" } @@ -249,7 +249,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } It "Should return absent from the get method" { - (Get-TargetResource @testParams).Ensure | Should Be "Absent" + (Get-TargetResource @testParams).Ensure | Should Be "Absent" } It "Should return false from the test method" { @@ -304,7 +304,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } It "Should return absent from the get method" { - (Get-TargetResource @testParams).Ensure | Should Be "Absent" + (Get-TargetResource @testParams).Ensure | Should Be "Absent" } It "Should return false from the test method" { @@ -318,7 +318,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Assert-MockCalled -CommandName "Connect-SPConfigurationDatabase" } } - + Context -Name "A config database exists, and this server is connected to it and should be" -Fixture { $testParams = @{ Ensure = "Present" @@ -330,18 +330,18 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { RunCentralAdmin = $true } - Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { - return "Connection string example" + Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { + return "Connection string example" } - Mock -CommandName "Get-SPFarm" -MockWith { + Mock -CommandName "Get-SPFarm" -MockWith { return @{ Name = $testParams.FarmConfigDatabaseName DatabaseServer = @{ Name = $testParams.DatabaseServer } AdminContentDatabaseName = $testParams.AdminContentDatabaseName - } + } } Mock -CommandName "Get-SPDSCConfigDBStatus" -MockWith { return @{ @@ -350,8 +350,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { DatabaseExists = $true } } - Mock -CommandName "Get-SPDatabase" -MockWith { - return @(@{ + Mock -CommandName "Get-SPDatabase" -MockWith { + return @(@{ Name = $testParams.FarmConfigDatabaseName Type = "Configuration Database" NormalizedDataSource = $testParams.DatabaseServer @@ -360,23 +360,23 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName "Get-SPWebApplication" -MockWith { return @{ IsAdministrationWebApplication = $true - ContentDatabases = @(@{ - Name = $testParams.AdminContentDatabaseName + ContentDatabases = @(@{ + Name = $testParams.AdminContentDatabaseName }) - IISSettings = @(@{ - DisableKerberos = $true + IISSettings = @(@{ + DisableKerberos = $true }) Url = "http://localhost:9999" } } - + It "Should return present from the get method" { - (Get-TargetResource @testParams).Ensure | Should Be "Present" + (Get-TargetResource @testParams).Ensure | Should Be "Present" } It "Should return true from the test method" { Test-TargetResource @testParams | Should be $true - } + } } Context -Name "Absent is specified for the ensure property" -Fixture { @@ -403,7 +403,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } } - if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 15) + if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 15) { Context -Name "Only valid parameters for SharePoint 2013 are used" -Fixture { $testParams = @{ @@ -443,18 +443,18 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { RunCentralAdmin = $true } - Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { - return "Connection string example" + Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { + return "Connection string example" } - Mock -CommandName "Get-SPFarm" -MockWith { + Mock -CommandName "Get-SPFarm" -MockWith { return @{ Name = $testParams.FarmConfigDatabaseName DatabaseServer = @{ Name = $testParams.DatabaseServer } AdminContentDatabaseName = $testParams.AdminContentDatabaseName - } + } } Mock -CommandName "Get-SPDSCConfigDBStatus" -MockWith { return @{ @@ -463,23 +463,23 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { DatabaseExists = $true } } - Mock -CommandName "Get-SPDatabase" -MockWith { - return @(@{ + Mock -CommandName "Get-SPDatabase" -MockWith { + return @(@{ Name = $testParams.FarmConfigDatabaseName Type = "Configuration Database" - Server = @{ - Name = $testParams.DatabaseServer + Server = @{ + Name = $testParams.DatabaseServer } }) } Mock -CommandName "Get-SPWebApplication" -MockWith { return @{ IsAdministrationWebApplication = $true - ContentDatabases = @(@{ - Name = $testParams.AdminContentDatabaseName + ContentDatabases = @(@{ + Name = $testParams.AdminContentDatabaseName }) - IISSettings = @(@{ - DisableKerberos = $true + IISSettings = @(@{ + DisableKerberos = $true }) Url = "http://localhost:9999" } @@ -514,7 +514,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { CentralAdministrationPort = 1234 ServerRole = "ApplicationWithSearch" RunCentralAdmin = $false - } + } Mock -CommandName Get-SPDSCInstalledProductVersion -MockWith { return @{ @@ -595,18 +595,18 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { AdminContentDatabaseName = "SP_AdminContent" RunCentralAdmin = $true } - Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { - return "Connection string example" + Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { + return "Connection string example" } - Mock -CommandName "Get-SPFarm" -MockWith { + Mock -CommandName "Get-SPFarm" -MockWith { return @{ Name = $testParams.FarmConfigDatabaseName DatabaseServer = @{ Name = $testParams.DatabaseServer } AdminContentDatabaseName = $testParams.AdminContentDatabaseName - } + } } Mock -CommandName "Get-SPDSCConfigDBStatus" -MockWith { return @{ @@ -615,23 +615,23 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { DatabaseExists = $true } } - Mock -CommandName "Get-SPDatabase" -MockWith { - return @(@{ + Mock -CommandName "Get-SPDatabase" -MockWith { + return @(@{ Name = $testParams.FarmConfigDatabaseName Type = "Configuration Database" - Server = @{ - Name = $testParams.DatabaseServer + Server = @{ + Name = $testParams.DatabaseServer } }) } Mock -CommandName "Get-SPWebApplication" -MockWith { return @{ IsAdministrationWebApplication = $true - ContentDatabases = @(@{ - Name = $testParams.AdminContentDatabaseName + ContentDatabases = @(@{ + Name = $testParams.AdminContentDatabaseName }) - IISSettings = @(@{ - DisableKerberos = $true + IISSettings = @(@{ + DisableKerberos = $true }) Url = "http://localhost:9999" } @@ -661,7 +661,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { ServerRole = "ApplicationWithSearch" RunCentralAdmin = $true } - + Mock -CommandName Get-SPDSCInstalledProductVersion -MockWith { return @{ FileMajorPart = 14 } } It "Should throw when an unsupported version is installed and set is called" { @@ -680,10 +680,10 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { RunCentralAdmin = $true } - Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { - return "Connection string example" + Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { + return "Connection string example" } - Mock -CommandName "Get-SPFarm" -MockWith { + Mock -CommandName "Get-SPFarm" -MockWith { return $null } Mock -CommandName "Get-SPDSCConfigDBStatus" -MockWith { @@ -693,7 +693,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { DatabaseExists = $false } } - Mock -CommandName "Get-SPDatabase" -MockWith { + Mock -CommandName "Get-SPDatabase" -MockWith { return $null } Mock -CommandName "Get-SPWebApplication" -MockWith { @@ -708,5 +708,76 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Test-TargetResource @testParams | Should Be $true } } + + Context -Name "A config database exists, and this server is connected (with FQDN) to it and should be" -Fixture { + $testParams = @{ + Ensure = "Present" + FarmConfigDatabaseName = "SP_Config" + DatabaseServer = "sql.contoso.com" + FarmAccount = $mockFarmAccount + Passphrase = $mockPassphrase + AdminContentDatabaseName = "SP_AdminContent" + RunCentralAdmin = $true + } + + Mock -CommandName "Get-SPServer" -MockWith { + return $null + } -ParameterFilter { $Identity -eq $env:COMPUTERNAME } + + Mock -CommandName "Get-SPServer" -MockWith { + return @{ + Name = "spwfe" + Role = "WebFrontEnd" + } + } + + Mock -CommandName "Get-SPDSCRegistryKey" -MockWith { + return "Connection string example" + } + + Mock -CommandName "Get-SPFarm" -MockWith { + return @{ + Name = $testParams.FarmConfigDatabaseName + DatabaseServer = @{ + Name = $testParams.DatabaseServer + } + AdminContentDatabaseName = $testParams.AdminContentDatabaseName + } + } + Mock -CommandName "Get-SPDSCConfigDBStatus" -MockWith { + return @{ + Locked = $false + ValidPermissions = $true + DatabaseExists = $true + } + } + Mock -CommandName "Get-SPDatabase" -MockWith { + return @(@{ + Name = $testParams.FarmConfigDatabaseName + Type = "Configuration Database" + NormalizedDataSource = $testParams.DatabaseServer + }) + } + Mock -CommandName "Get-SPWebApplication" -MockWith { + return @{ + IsAdministrationWebApplication = $true + ContentDatabases = @(@{ + Name = $testParams.AdminContentDatabaseName + }) + IISSettings = @(@{ + DisableKerberos = $true + }) + Url = "http://localhost:9999" + } + } + + It "Should return present from the get method" { + (Get-TargetResource @testParams).Ensure | Should Be "Present" + } + + It "Should return true from the test method" { + Test-TargetResource @testParams | Should be $true + } + } } } diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index a205af4ef..f029a8fac 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -24,6 +24,15 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $mockCredential = New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList @("DOMAIN\username", $mockPassword) + if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16) + { + $name = "contoso-com" + } + else + { + $name = "contoso" + } + try { [Microsoft.Office.Server.UserProfiles] } catch { try { @@ -69,14 +78,25 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } - public static System.Object GetMethod(System.Object a, System.Object b) + public System.Object GetMethod(System.Object a, System.Object b) {return new ActiveDirectoryImportConnection();} public System.Object Invoke(System.Object a, System.Object b) {return "";} } } -"@ -ErrorAction SilentlyContinue +"@ -ErrorAction SilentlyContinue -PassThru | Add-Member -MemberType ScriptMethod -Name GetMethod -Value { + param ($a, $b) + return (@{ + FullName = $a + }) | Add-Member -MemberType ScriptMethod -Name Invoke -Value { + switch ($this.FullName) + { + get_NamingContexts { return "NC" } + get_UseSSL { return $false } + } + } -PassThru -Force + } -PassThru -Force } catch { Write-Verbose -Message "The Type Microsoft.Office.Server.UserProfiles.ActiveDirectoryImportConnection was already added." @@ -98,11 +118,12 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } } $connection = @{ - DisplayName = "Contoso" + DisplayName = $name Server = "contoso.com" NamingContexts = New-Object -TypeName System.Collections.ArrayList AccountDomain = "Contoso" AccountUsername = "TestAccount" + UseDisabledFilter = $false Type = "ActiveDirectory" } $connection = $connection | Add-Member -MemberType ScriptMethod ` @@ -214,7 +235,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName Get-SPServiceApplication -MockWith { return $userProfileServiceNoConnections } It "Should return null from the Get method" { - Get-TargetResource @testParams | Should BeNullOrEmpty + (Get-TargetResource @testParams).UserProfileService | Should BeNullOrEmpty Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } } @@ -248,7 +269,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $ConnnectionManager.Add($connection) It "Should return service instance from the Get method" { - Get-TargetResource @testParams | Should Not BeNullOrEmpty + (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } } @@ -278,7 +299,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } $litWareconnection = @{ - DisplayName = "Contoso" + DisplayName = $name Server = "litware.net" NamingContexts= New-Object -TypeName System.Collections.ArrayList AccountDomain = "Contoso" @@ -327,7 +348,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -ParameterFilter { $TypeName -eq "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" } It "Should return service instance from the Get method" { - Get-TargetResource @testParams | Should Not BeNullOrEmpty + (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } } @@ -437,7 +458,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -PassThru -Force } -PassThru -Force } -PassThru -Force - $userProfileServiceValidConnection.ConnectionManager.Add($connection); + $userProfileServiceValidConnection.ConnectionManager.Add($connection) + Mock -CommandName Get-SPServiceApplication -MockWith { return $userProfileServiceValidConnection } @@ -456,7 +478,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } It "Should return values from the get method" { - Get-TargetResource @difOUsTestParams | Should Not BeNullOrEmpty + (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } } @@ -475,66 +497,81 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } } - Context -Name "When naming context is null (ADImport for SP2016)" -Fixture { - $testParams = @{ - UserProfileService = "User Profile Service Application" - Forest = "contoso.com" - Name = "Contoso" - ConnectionCredentials = $mockCredential - Server = "server.contoso.com" - UseSSL = $false - IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") - ConnectionType = "ActiveDirectory" - } - - $litWareconnection = @{ - DisplayName = "Contoso" - Server = "litware.net" - NamingContexts= New-Object -TypeName System.Collections.ArrayList - AccountDomain = "Contoso" - AccountUsername = "TestAccount" - Type= "ActiveDirectory" - } - - $userProfileServiceValidConnection = @{ - Name = "User Profile Service Application" - TypeName = "User Profile Service Application" - ApplicationPool = "SharePoint Service Applications" - FarmAccount = $mockCredential - ServiceApplicationProxyGroup = "Proxy Group" - ConnectionManager= New-Object -TypeName System.Collections.ArrayList - } - - $userProfileServiceValidConnection.ConnectionManager.Add($litWareconnection); - Mock -CommandName Get-SPServiceApplication -MockWith { - return $userProfileServiceValidConnection - } - $litwareConnnectionManager = New-Object -TypeName System.Collections.ArrayList | Add-Member -MemberType ScriptMethod AddActiveDirectoryConnection{ ` - param([Microsoft.Office.Server.UserProfiles.ConnectionType] $connectionType, ` - $name, ` - $forest, ` - $useSSL, ` - $userName, ` - $securePassword, ` - $namingContext, ` - $p1, $p2 ` - ) - - $Global:SPDscUPSAddActiveDirectoryConnectionCalled =$true - } -PassThru - $litwareConnnectionManager.Add($litWareconnection) - - Mock -CommandName New-Object -MockWith { - return (@{} | Add-Member -MemberType ScriptMethod IsSynchronizationRunning { - $Global:SPDscUpsSyncIsSynchronizationRunning=$true; - return $false; - } -PassThru | Add-Member ConnectionManager $litwareConnnectionManager -PassThru ) - } -ParameterFilter { $TypeName -eq "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" } - + if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16) + { + Context -Name "When naming context is null (ADImport for SP2016)" -Fixture { + $testParams = @{ + UserProfileService = "User Profile Service Application" + Forest = "contoso.com" + Name = "Contoso" + ConnectionCredentials = $mockCredential + Server = "server.contoso.com" + UseSSL = $false + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") + ConnectionType = "ActiveDirectory" + } + $litWareconnection = @{ + DisplayName = $name + Server = "litware.net" + NamingContexts= New-Object -TypeName System.Collections.ArrayList + AccountDomain = "Contoso" + AccountUsername = "TestAccount" + UseDisabledFilter = $false + Type= "ActiveDirectory" + } - It "Should return values from the get method" { - Get-TargetResource @testParams | Should Not BeNullOrEmpty + $userProfileServiceValidConnection = @{ + Name = "User Profile Service Application" + TypeName = "User Profile Service Application" + ApplicationPool = "SharePoint Service Applications" + FarmAccount = $mockCredential + ServiceApplicationProxyGroup = "Proxy Group" + ConnectionManager= New-Object -TypeName System.Collections.ArrayList + } | Add-Member -MemberType ScriptMethod -Name GetMethod -Value { + return (@{ + FullName = $getTypeFullName + }) | Add-Member -MemberType ScriptMethod -Name GetMethod -Value { + return (@{ + Name = "get_NamingContexts" + }) | Add-Member -MemberType ScriptMethod -Name Invoke -Value { + return @{ + AbsoluteUri = "http://contoso.sharepoint.com/sites/ct" + } + } -PassThru -Force + } -PassThru -Force + } -PassThru -Force + $userProfileServiceValidConnection.ConnectionManager.Add($connection); + + $userProfileServiceValidConnection.ConnectionManager.Add($litWareconnection); + Mock -CommandName Get-SPServiceApplication -MockWith { + return $userProfileServiceValidConnection + } + $litwareConnnectionManager = New-Object -TypeName System.Collections.ArrayList | Add-Member -MemberType ScriptMethod AddActiveDirectoryConnection{ ` + param([Microsoft.Office.Server.UserProfiles.ConnectionType] $connectionType, ` + $name, ` + $forest, ` + $useSSL, ` + $userName, ` + $securePassword, ` + $namingContext, ` + $p1, $p2 ` + ) + + $Global:SPDscUPSAddActiveDirectoryConnectionCalled =$true + } -PassThru + $litwareConnnectionManager.Add($litWareconnection) + + Mock -CommandName New-Object -MockWith { + return (@{} | Add-Member -MemberType ScriptMethod IsSynchronizationRunning { + $Global:SPDscUpsSyncIsSynchronizationRunning=$true; + return $false; + } -PassThru | Add-Member ConnectionManager $litwareConnnectionManager -PassThru ) + } -ParameterFilter { $TypeName -eq "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" } + + It "Should return values from the get method" { + (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty + } } } } From 7bc9bc6080c11f6d1b8823c3dd4d2cfdd025c845 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Mon, 4 Jun 2018 16:28:25 +0200 Subject: [PATCH 36/56] Updated changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40a4ed84d..e609959c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,8 +15,10 @@ * SPUserProfileServiceApp * Now supported specifying the host Managed path, and properly sets the host. * SPUserProfileSyncConnection - * Added support for filtering disabled users (issue 794) - * Fixed issue where UseSSL was set to true resulted in an error (issue 774) + * Added support for filtering disabled users + * Fixed issue where UseSSL was set to true resulted in an error + * Fixed issue where the connection was recreated when the name contained a + dot (SP2016) ## 2.2 From fa8ce0e1c08d915fe0f6fb82eabf04af723a00b7 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Mon, 4 Jun 2018 20:35:47 +0200 Subject: [PATCH 37/56] Updates to tests, to increase code coverage --- ...tDsc.SPUserProfileSyncConnection.Tests.ps1 | 73 ++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index f029a8fac..b68b7394a 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -212,6 +212,34 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } # Test contexts + Context -Name "When UPS doesn't exist" -Fixture { + $testParams = @{ + UserProfileService = "User Profile Service Application" + Forest = "contoso.com" + Name = "Contoso" + ConnectionCredentials = $mockCredential + Server = "server.contoso.com" + UseSSL = $false + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") + ConnectionType = "ActiveDirectory" + } + + Mock -CommandName Get-SPServiceApplication -MockWith { return $null } + + It "Should return null from the Get method" { + (Get-TargetResource @testParams).UserProfileService | Should BeNullOrEmpty + Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } + } + + It "Should return false when the Test method is called" { + Test-TargetResource @testParams | Should Be $false + } + + It "Should create a new service application in the set method" { + { Set-TargetResource @testParams } | Should throw "User Profile Service Application $($testParams.UserProfileService) not found" + } + } + Context -Name "When connection doesn't exist" -Fixture { $testParams = @{ UserProfileService = "User Profile Service Application" @@ -286,6 +314,45 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } } + + Context -Name "Port and UseDisabledFilter are specified and UseSSL is True" -Fixture { + $testParams = @{ + UserProfileService = "User Profile Service Application" + Forest = "contoso.com" + Name = "Contoso" + ConnectionCredentials = $mockCredential + Server = "server.contoso.com" + UseSSL = $true + UseDisabledFilter = $true + Port = 636 + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") + ConnectionType = "ActiveDirectory" + } + + Mock -CommandName Get-SPServiceApplication -MockWith { + return $userProfileServiceValidConnection + } + + $ConnnectionManager.Add($connection) + + It "Should return service instance from the Get method" { + (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty + Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } + } + + It "Should return false when the Test method is called" { + Test-TargetResource @testParams | Should Be $false + } + + It "execute update credentials" { + $Global:SPDscUPSSyncConnectionSetCredentialsCalled=$false + $Global:SPDscUPSSyncConnectionRefreshSchemaCalled=$false + Set-TargetResource @testParams + $Global:SPDscUPSSyncConnectionSetCredentialsCalled | Should be $true + $Global:SPDscUPSSyncConnectionRefreshSchemaCalled | Should be $true + } + } + Context -Name "When connection exists and forest is different" -Fixture { $testParams = @{ UserProfileService = "User Profile Service Application" @@ -293,7 +360,6 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Name = "Contoso" ConnectionCredentials = $mockCredential Server = "server.contoso.com" - UseSSL = $false IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") ConnectionType = "ActiveDirectory" } @@ -381,6 +447,11 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $Global:SPDscUPSSyncConnectionDeleteCalled | Should be $true $Global:SPDscUPSAddActiveDirectoryConnectionCalled | Should be $true } + + It "returns false in Test method as force is specified" { + Test-TargetResource @forceTestParams | Should Be $false + } + } Context -Name "When synchronization is running" -Fixture { From 677a23e8e8d7b71aefcb5db2f12d532a2cf9ce94 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Tue, 5 Jun 2018 15:17:37 +0200 Subject: [PATCH 38/56] Minor review updates --- .../MSFT_SPUserProfileSyncConnection.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index c7d22e523..6111b8359 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -70,7 +70,7 @@ function Get-TargetResource $nullreturn = @{ Name = $params.Name - UserprofileService = $null + UserProfileService = $null Forest = $null ConnectionCredentials = $null IncludedOUs = $null @@ -153,7 +153,7 @@ function Get-TargetResource return @{ Name = $params.Name - UserprofileService = $params.UserProfileService + UserProfileService = $params.UserProfileService Forest = $namingContexts.DistinguishedName ConnectionCredentials = $accountCredentials IncludedOUs = @($namingContexts.ContainersIncluded) From 15770a6f63e93c67916b360b84b5880ab73b1f72 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Thu, 7 Jun 2018 08:55:38 -0400 Subject: [PATCH 39/56] Fixes for Connection Display Name --- .../MSFT_SPUserProfileSyncConnection.psm1 | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index 6111b8359..05e58c543 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -93,19 +93,8 @@ function Get-TargetResource $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` -ArgumentList $context - # In SP2016, the forest name is used as name but the dot is replaced by a dash - $installedVersion = Get-SPDSCInstalledProductVersion - if ($installedVersion.FileMajorPart -eq 16) - { - $Name = $params.Forest -replace "\.", "-" - } - else - { - $Name = $params.Name - } - $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $Name + $_.DisplayName -eq $params.Name } if ($null -eq $connection) { @@ -339,19 +328,8 @@ function Set-TargetResource throw "Synchronization is in Progress." } - # In SP2016, the forest name is used as name but the dot is replaced by a dash - $installedVersion = Get-SPDSCInstalledProductVersion - if ($installedVersion.FileMajorPart -eq 16) - { - $Name = $Forest -replace "\.", "-" - } - else - { - $Name = $params.Name - } - $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $Name + $_.DisplayName -eq $params.Name } | Select-Object -first 1 if ($null -ne $connection -and $params.Forest -ieq $connection.Server) From 64e15e9c9020ad0556f49cd35fed9fe12180401c Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Thu, 7 Jun 2018 10:00:56 -0400 Subject: [PATCH 40/56] Fixes for tests --- .../MSFT_SPUserProfileSyncConnection.psm1 | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index 05e58c543..f0b77bcac 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -93,8 +93,16 @@ function Get-TargetResource $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` -ArgumentList $context + if($null -ne $params.Name) + { + $Name = $params.Name + } + else + { + $Name = $params.Forest.Replace(".", "-") + } $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name + $_.DisplayName -eq $Name } if ($null -eq $connection) { @@ -328,8 +336,16 @@ function Set-TargetResource throw "Synchronization is in Progress." } + if($null -ne $params.Name) + { + $Name = $params.Name + } + else { + $Name = $params.Forest.Replace(".", "-") + } + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name + $_.DisplayName -eq $Name } | Select-Object -first 1 if ($null -ne $connection -and $params.Forest -ieq $connection.Server) From 0019b70296df83fbf1f08ee472517b343567772a Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Thu, 7 Jun 2018 12:38:49 -0400 Subject: [PATCH 41/56] Fix Tests names --- .../MSFT_SPUserProfileSyncConnection.psm1 | 10 +--------- ...SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 | 9 +-------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index f0b77bcac..844fb91ac 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -93,16 +93,8 @@ function Get-TargetResource $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` -ArgumentList $context - if($null -ne $params.Name) - { - $Name = $params.Name - } - else - { - $Name = $params.Forest.Replace(".", "-") - } $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $Name + $_.DisplayName -eq $params.Name } if ($null -eq $connection) { diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index b68b7394a..05d42191e 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -24,14 +24,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $mockCredential = New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList @("DOMAIN\username", $mockPassword) - if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16) - { - $name = "contoso-com" - } - else - { - $name = "contoso" - } + $name = "contoso" try { [Microsoft.Office.Server.UserProfiles] } catch { From 0a126d78be38946aaef51b6a2f9d12d7466cbc38 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 14:07:14 -0400 Subject: [PATCH 42/56] Fix Get for UPS Converted the error for current user being farm account into a warning. --- .../MSFT_SPUserProfileServiceApp.psm1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index e061cedbd..504884ea8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -95,9 +95,8 @@ function Get-TargetResource $localaccount = "$($Env:USERDOMAIN)\$($Env:USERNAME)" if ($localaccount -eq $farmAccount.UserName) { - throw ("Specified PSDSCRunAsCredential ($localaccount) is the Farm " + ` - "Account. Make sure the specified PSDSCRunAsCredential isn't the " + ` - "Farm Account and try again") + Write-Verbose -Message ("The current user ($localaccount) is the Farm " + ` + "Account.") } } } From a7c1a56a03a9b42c4ff4081a1abda761a54ac17f Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 14:09:44 -0400 Subject: [PATCH 43/56] Fix tests --- .../SharePointDsc.SPUserProfileServiceApp.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 index 6174fe652..51edc9bfa 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 @@ -92,8 +92,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName Restart-Service {} - It "Should throw exception in the Get method" { - { Get-TargetResource @testParams } | Should throw "Specified PSDSCRunAsCredential " + It "Should NOT throw exception in the Get method" { + { Get-TargetResource @testParams } | (Get-TargetResource @testParams).Ensure | Should Be "Present" } It "Should throw exception in the Test method" { From 9377962d11444861140bd02c7f6dfd92187e386a Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 14:11:49 -0400 Subject: [PATCH 44/56] Update MSFT_SPUserProfileSyncConnection.psm1 --- .../MSFT_SPUserProfileSyncConnection.psm1 | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index 844fb91ac..6111b8359 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -93,8 +93,19 @@ function Get-TargetResource $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` -ArgumentList $context + # In SP2016, the forest name is used as name but the dot is replaced by a dash + $installedVersion = Get-SPDSCInstalledProductVersion + if ($installedVersion.FileMajorPart -eq 16) + { + $Name = $params.Forest -replace "\.", "-" + } + else + { + $Name = $params.Name + } + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name + $_.DisplayName -eq $Name } if ($null -eq $connection) { @@ -328,12 +339,15 @@ function Set-TargetResource throw "Synchronization is in Progress." } - if($null -ne $params.Name) + # In SP2016, the forest name is used as name but the dot is replaced by a dash + $installedVersion = Get-SPDSCInstalledProductVersion + if ($installedVersion.FileMajorPart -eq 16) { - $Name = $params.Name + $Name = $Forest -replace "\.", "-" } - else { - $Name = $params.Forest.Replace(".", "-") + else + { + $Name = $params.Name } $connection = $upcm.ConnectionManager | Where-Object -FilterScript { From dc9495413591e1302126a5876435439cca5a1a32 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 14:12:46 -0400 Subject: [PATCH 45/56] Update SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 --- ...SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index 05d42191e..3a68c7b6d 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -24,7 +24,14 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $mockCredential = New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList @("DOMAIN\username", $mockPassword) - $name = "contoso" + if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16) + { + $name = "contoso-com" + } + else + { + $name = "contoso" + } try { [Microsoft.Office.Server.UserProfiles] } catch { @@ -642,4 +649,3 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } Invoke-Command -ScriptBlock $Global:SPDscHelper.CleanupScript -NoNewScope - From 038a6a2de3da30eb0e3bfa70ac541c796d4fd553 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 14:16:48 -0400 Subject: [PATCH 46/56] Update SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 --- .../SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index 3a68c7b6d..30eba106f 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -649,3 +649,4 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } Invoke-Command -ScriptBlock $Global:SPDscHelper.CleanupScript -NoNewScope + From 8dcf4478c23accd730901504c0d88e7c2c0b8ea7 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 14:17:57 -0400 Subject: [PATCH 47/56] Fix line return --- .../SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index 30eba106f..3a68c7b6d 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -649,4 +649,3 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } Invoke-Command -ScriptBlock $Global:SPDscHelper.CleanupScript -NoNewScope - From be0b9cf6a4a4e979695fe130cac97c031ec50981 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 14:18:18 -0400 Subject: [PATCH 48/56] Commit line feed EOF --- .../SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index 3a68c7b6d..b68b7394a 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -649,3 +649,4 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } Invoke-Command -ScriptBlock $Global:SPDscHelper.CleanupScript -NoNewScope + From 3171d9f032669f0203c3d43cc64a199b864929f6 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 15:13:59 -0400 Subject: [PATCH 49/56] MAde change based on recommendation to add warning --- .../MSFT_SPUserProfileServiceApp.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index 504884ea8..6d9bce52c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -96,7 +96,7 @@ function Get-TargetResource if ($localaccount -eq $farmAccount.UserName) { Write-Verbose -Message ("The current user ($localaccount) is the Farm " + ` - "Account.") + "Account. Please note that this will cause issues when applying the configuration.") } } } From 93cf421f2f16859bb2cf0a94e5c8df411a3cf614 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 15:24:40 -0400 Subject: [PATCH 50/56] Restored from main branch --- .../MSFT_SPUserProfileSyncConnection.psm1 | 24 ++++-- ...tDsc.SPUserProfileSyncConnection.Tests.ps1 | 80 ++++++++++++++++++- 2 files changed, 98 insertions(+), 6 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index 844fb91ac..6111b8359 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -93,8 +93,19 @@ function Get-TargetResource $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` -ArgumentList $context + # In SP2016, the forest name is used as name but the dot is replaced by a dash + $installedVersion = Get-SPDSCInstalledProductVersion + if ($installedVersion.FileMajorPart -eq 16) + { + $Name = $params.Forest -replace "\.", "-" + } + else + { + $Name = $params.Name + } + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $params.Name + $_.DisplayName -eq $Name } if ($null -eq $connection) { @@ -328,12 +339,15 @@ function Set-TargetResource throw "Synchronization is in Progress." } - if($null -ne $params.Name) + # In SP2016, the forest name is used as name but the dot is replaced by a dash + $installedVersion = Get-SPDSCInstalledProductVersion + if ($installedVersion.FileMajorPart -eq 16) { - $Name = $params.Name + $Name = $Forest -replace "\.", "-" } - else { - $Name = $params.Forest.Replace(".", "-") + else + { + $Name = $params.Name } $connection = $upcm.ConnectionManager | Where-Object -FilterScript { diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index 05d42191e..f49ad9d98 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -24,7 +24,14 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $mockCredential = New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList @("DOMAIN\username", $mockPassword) - $name = "contoso" + if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16) + { + $name = "contoso-com" + } + else + { + $name = "contoso" + } try { [Microsoft.Office.Server.UserProfiles] } catch { @@ -561,6 +568,77 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } } + Context -Name "Connection exists and name contains dots" -Fixture { + $testParams = @{ + UserProfileService = "User Profile Service Application" + Forest = "contoso.com" + Name = "Contoso" + ConnectionCredentials = $mockCredential + Server = "server.contoso.com" + UseSSL = $false + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") + ConnectionType = "ActiveDirectory" + } + + $userProfileServiceValidConnection = @{ + Name = "User Profile Service Application" + TypeName = "User Profile Service Application" + ApplicationPool = "SharePoint Service Applications" + FarmAccount = $mockCredential + ServiceApplicationProxyGroup = "Proxy Group" + ConnectionManager= New-Object -TypeName System.Collections.ArrayList + } | Add-Member -MemberType ScriptMethod -Name GetMethod -Value { + return (@{ + FullName = $getTypeFullName + }) | Add-Member -MemberType ScriptMethod -Name GetMethods -Value { + return (@{ + Name = "get_NamingContexts" + }) | Add-Member -MemberType ScriptMethod -Name Invoke -Value { + return @{ + AbsoluteUri = "http://contoso.sharepoint.com/sites/ct" + } + } -PassThru -Force + } -PassThru -Force + } -PassThru -Force + $userProfileServiceValidConnection.ConnectionManager.Add($connection) + + Mock -CommandName Get-SPServiceApplication -MockWith { + return $userProfileServiceValidConnection + } + + $difOUsTestParams = @{ + UserProfileService = "User Profile Service Application" + Forest = "contoso.com" + Name = "Contoso" + ConnectionCredentials = $mockCredential + Server = "server.contoso.com" + UseSSL = $false + Force = $false + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com","OU=Notes Users,DC=Contoso,DC=com") + ExcludedOUs = @("OU=Excluded, OU=SharePoint Users,DC=Contoso,DC=com") + ConnectionType = "ActiveDirectory" + } + + It "Should return values from the get method" { + (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty + Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } + } + + It "Should return false when the Test method is called" { + Test-TargetResource @difOUsTestParams | Should Be $false + } + + It "Should update OU lists" { + $Global:SPDscUPSSyncConnectionUpdateCalled= $false + $Global:SPDscUPSSyncConnectionSetCredentialsCalled = $false + $Global:SPDscUPSSyncConnectionRefreshSchemaCalled =$false + Set-TargetResource @difOUsTestParams + $Global:SPDscUPSSyncConnectionUpdateCalled | Should be $true + $Global:SPDscUPSSyncConnectionSetCredentialsCalled | Should be $true + $Global:SPDscUPSSyncConnectionRefreshSchemaCalled | Should be $true + } + } + if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16) { Context -Name "When naming context is null (ADImport for SP2016)" -Fixture { From 39352014246b340218638ec8ce4fac34e991c069 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 11 Jun 2018 15:28:48 -0400 Subject: [PATCH 51/56] Updated changelog and Tests --- CHANGELOG.md | 1 + .../SharePointDsc.SPUserProfileServiceApp.Tests.ps1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de8589f0d..238d300eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * Added the resource. * SPUserProfileServiceApp * Now supported specifying the host Managed path, and properly sets the host. + * Changed error for running with Farm Account into being a warning * SPUserProfileSyncConnection * Added support for filtering disabled users * Fixed issue where UseSSL was set to true resulted in an error diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 index 51edc9bfa..7d8842ec2 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 @@ -93,7 +93,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName Restart-Service {} It "Should NOT throw exception in the Get method" { - { Get-TargetResource @testParams } | (Get-TargetResource @testParams).Ensure | Should Be "Present" + (Get-TargetResource @testParams).Ensure | Should Be "Present" } It "Should throw exception in the Test method" { From 1e9260aaa46e92590a8ecf9e7c26f89f63fff369 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 12 Jun 2018 08:13:12 -0400 Subject: [PATCH 52/56] Fix for UPS Connection name --- ...tDsc.SPUserProfileSyncConnection.Tests.ps1 | 36 ++----------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index f49ad9d98..d34fbe479 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -572,11 +572,9 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { $testParams = @{ UserProfileService = "User Profile Service Application" Forest = "contoso.com" - Name = "Contoso" + Name = "contoso.com" ConnectionCredentials = $mockCredential Server = "server.contoso.com" - UseSSL = $false - IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") ConnectionType = "ActiveDirectory" } @@ -606,36 +604,8 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { return $userProfileServiceValidConnection } - $difOUsTestParams = @{ - UserProfileService = "User Profile Service Application" - Forest = "contoso.com" - Name = "Contoso" - ConnectionCredentials = $mockCredential - Server = "server.contoso.com" - UseSSL = $false - Force = $false - IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com","OU=Notes Users,DC=Contoso,DC=com") - ExcludedOUs = @("OU=Excluded, OU=SharePoint Users,DC=Contoso,DC=com") - ConnectionType = "ActiveDirectory" - } - - It "Should return values from the get method" { - (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty - Assert-MockCalled Get-SPServiceApplication -ParameterFilter { $Name -eq $testParams.UserProfileService } - } - - It "Should return false when the Test method is called" { - Test-TargetResource @difOUsTestParams | Should Be $false - } - - It "Should update OU lists" { - $Global:SPDscUPSSyncConnectionUpdateCalled= $false - $Global:SPDscUPSSyncConnectionSetCredentialsCalled = $false - $Global:SPDscUPSSyncConnectionRefreshSchemaCalled =$false - Set-TargetResource @difOUsTestParams - $Global:SPDscUPSSyncConnectionUpdateCalled | Should be $true - $Global:SPDscUPSSyncConnectionSetCredentialsCalled | Should be $true - $Global:SPDscUPSSyncConnectionRefreshSchemaCalled | Should be $true + It "Should return Ensure Present from the get method" { + (Get-TargetResource @testParams).Ensure | Should Be "Present" } } From 3f051da60fef57ab1e19dcbcb8be284053468b1c Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 12 Jun 2018 08:15:53 -0400 Subject: [PATCH 53/56] Commited tests --- .../MSFT_SPUserProfileSyncConnection.psm1 | 20 +- ...tDsc.SPUserProfileSyncConnection.Tests.ps1 | 201 +++++++++++++++++- 2 files changed, 212 insertions(+), 9 deletions(-) diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index 6111b8359..fc56cbf55 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -81,6 +81,7 @@ function Get-TargetResource UseDisabledFilter = $null ConnectionType = $null Force = $null + Ensure = "Absent" } if ($null -eq $ups) @@ -93,20 +94,21 @@ function Get-TargetResource $upcm = New-Object -TypeName "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" ` -ArgumentList $context + $Name = $params.Name + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { + $_.DisplayName -eq $Name + } + # In SP2016, the forest name is used as name but the dot is replaced by a dash $installedVersion = Get-SPDSCInstalledProductVersion - if ($installedVersion.FileMajorPart -eq 16) + if ($installedVersion.FileMajorPart -eq 16 -and $null -eq $connection) { $Name = $params.Forest -replace "\.", "-" - } - else - { - $Name = $params.Name + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { + $_.DisplayName -eq $Name + } } - $connection = $upcm.ConnectionManager | Where-Object -FilterScript { - $_.DisplayName -eq $Name - } if ($null -eq $connection) { return $nullreturn @@ -164,6 +166,7 @@ function Get-TargetResource UseDisabledFilter = $useDisabledFilter ConnectionType = $connection.Type -replace "Import","" Force = $params.Force + Ensure = "Present" } } @@ -201,6 +204,7 @@ function Get-TargetResource Port = $params.Port ConnectionType = $connection.Type.ToString() Force = $params.Force + Ensure = "Present" } } } diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index d34fbe479..388cf585e 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 @@ -575,9 +575,20 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Name = "contoso.com" ConnectionCredentials = $mockCredential Server = "server.contoso.com" + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") ConnectionType = "ActiveDirectory" } + $litWareconnection = @{ + DisplayName = "contoso.com" + Server = "litware.net" + NamingContexts= New-Object -TypeName System.Collections.ArrayList + AccountDomain = "Contoso" + AccountUsername = "TestAccount" + UseDisabledFilter = $false + Type= "ActiveDirectory" + } + $userProfileServiceValidConnection = @{ Name = "User Profile Service Application" TypeName = "User Profile Service Application" @@ -586,7 +597,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { ServiceApplicationProxyGroup = "Proxy Group" ConnectionManager= New-Object -TypeName System.Collections.ArrayList } | Add-Member -MemberType ScriptMethod -Name GetMethod -Value { - return (@{ + return (@{ FullName = $getTypeFullName }) | Add-Member -MemberType ScriptMethod -Name GetMethods -Value { return (@{ @@ -604,9 +615,39 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { return $userProfileServiceValidConnection } + $litwareConnnectionManager = New-Object -TypeName System.Collections.ArrayList | Add-Member -MemberType ScriptMethod AddActiveDirectoryConnection{ ` + param([Microsoft.Office.Server.UserProfiles.ConnectionType] $connectionType, ` + $name, ` + $forest, ` + $useSSL, ` + $userName, ` + $securePassword, ` + $namingContext, ` + $p1, $p2 ` + ) + + $Global:SPDscUPSAddActiveDirectoryConnectionCalled =$true + } -PassThru + $litwareConnnectionManager.Add($litWareconnection) + + Mock -CommandName New-Object -MockWith { + return (@{} | Add-Member -MemberType ScriptMethod IsSynchronizationRunning { + $Global:SPDscUpsSyncIsSynchronizationRunning=$true; + return $false; + } -PassThru | Add-Member ConnectionManager $litwareConnnectionManager -PassThru ) + } -ParameterFilter { $TypeName -eq "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" } + It "Should return Ensure Present from the get method" { (Get-TargetResource @testParams).Ensure | Should Be "Present" } + + It "Should return true when the Test method is called" { + { Test-TargetResource @testParams } | Should Be $true + } + + It "Should create a new connection in the set method" { + { Set-TargetResource @testParams } + } } if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16) @@ -685,6 +726,164 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { (Get-TargetResource @testParams).UserProfileService | Should Not BeNullOrEmpty } } + + Context -Name "Connection exists and name contains hyphens instead of dots" -Fixture { + $testParams = @{ + UserProfileService = "User Profile Service Application" + Forest = "contoso.com" + Name = "contoso.com" + ConnectionCredentials = $mockCredential + Server = "server.contoso.com" + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") + ConnectionType = "ActiveDirectory" + } + + $litWareconnection = @{ + DisplayName = "contoso-com" + Server = "litware.net" + NamingContexts= New-Object -TypeName System.Collections.ArrayList + AccountDomain = "Contoso" + AccountUsername = "TestAccount" + UseDisabledFilter = $false + Type= "ActiveDirectory" + } + + $userProfileServiceValidConnection = @{ + Name = "User Profile Service Application" + TypeName = "User Profile Service Application" + ApplicationPool = "SharePoint Service Applications" + FarmAccount = $mockCredential + ServiceApplicationProxyGroup = "Proxy Group" + ConnectionManager= New-Object -TypeName System.Collections.ArrayList + } | Add-Member -MemberType ScriptMethod -Name GetMethod -Value { + return (@{ + FullName = $getTypeFullName + }) | Add-Member -MemberType ScriptMethod -Name GetMethods -Value { + return (@{ + Name = "get_NamingContexts" + }) | Add-Member -MemberType ScriptMethod -Name Invoke -Value { + return @{ + AbsoluteUri = "http://contoso.sharepoint.com/sites/ct" + } + } -PassThru -Force + } -PassThru -Force + } -PassThru -Force + $userProfileServiceValidConnection.ConnectionManager.Add($connection) + + Mock -CommandName Get-SPServiceApplication -MockWith { + return $userProfileServiceValidConnection + } + + $litwareConnnectionManager = New-Object -TypeName System.Collections.ArrayList | Add-Member -MemberType ScriptMethod AddActiveDirectoryConnection{ ` + param([Microsoft.Office.Server.UserProfiles.ConnectionType] $connectionType, ` + $name, ` + $forest, ` + $useSSL, ` + $userName, ` + $securePassword, ` + $namingContext, ` + $p1, $p2 ` + ) + + $Global:SPDscUPSAddActiveDirectoryConnectionCalled =$true + } -PassThru + $litwareConnnectionManager.Add($litWareconnection) + + Mock -CommandName New-Object -MockWith { + return (@{} | Add-Member -MemberType ScriptMethod IsSynchronizationRunning { + $Global:SPDscUpsSyncIsSynchronizationRunning=$true; + return $false; + } -PassThru | Add-Member ConnectionManager $litwareConnnectionManager -PassThru ) + } -ParameterFilter { $TypeName -eq "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" } + + It "Should return Ensure Present from the get method" { + (Get-TargetResource @testParams).Ensure | Should Be "Present" + } + + It "Should return true when the Test method is called" { + { Test-TargetResource @testParams } | Should Be $true + } + + It "Should create a new connection in the set method" { + { Set-TargetResource @testParams } + } + } + } + else + { + Context -Name "Connection exists and name contains hyphens instead of dots" -Fixture { + $testParams = @{ + UserProfileService = "User Profile Service Application" + Forest = "contoso.com" + Name = "contoso.com" + ConnectionCredentials = $mockCredential + Server = "server.contoso.com" + IncludedOUs = @("OU=SharePoint Users,DC=Contoso,DC=com") + ConnectionType = "ActiveDirectory" + } + + $litWareconnection = @{ + DisplayName = "contoso-com" + Server = "litware.net" + NamingContexts= New-Object -TypeName System.Collections.ArrayList + AccountDomain = "Contoso" + AccountUsername = "TestAccount" + UseDisabledFilter = $false + Type= "ActiveDirectory" + } + + $userProfileServiceValidConnection = @{ + Name = "User Profile Service Application" + TypeName = "User Profile Service Application" + ApplicationPool = "SharePoint Service Applications" + FarmAccount = $mockCredential + ServiceApplicationProxyGroup = "Proxy Group" + ConnectionManager= New-Object -TypeName System.Collections.ArrayList + } | Add-Member -MemberType ScriptMethod -Name GetMethod -Value { + return (@{ + FullName = $getTypeFullName + }) | Add-Member -MemberType ScriptMethod -Name GetMethods -Value { + return (@{ + Name = "get_NamingContexts" + }) | Add-Member -MemberType ScriptMethod -Name Invoke -Value { + return @{ + AbsoluteUri = "http://contoso.sharepoint.com/sites/ct" + } + } -PassThru -Force + } -PassThru -Force + } -PassThru -Force + $userProfileServiceValidConnection.ConnectionManager.Add($connection) + + Mock -CommandName Get-SPServiceApplication -MockWith { + return $userProfileServiceValidConnection + } + + $litwareConnnectionManager = New-Object -TypeName System.Collections.ArrayList | Add-Member -MemberType ScriptMethod AddActiveDirectoryConnection{ ` + param([Microsoft.Office.Server.UserProfiles.ConnectionType] $connectionType, ` + $name, ` + $forest, ` + $useSSL, ` + $userName, ` + $securePassword, ` + $namingContext, ` + $p1, $p2 ` + ) + + $Global:SPDscUPSAddActiveDirectoryConnectionCalled =$true + } -PassThru + $litwareConnnectionManager.Add($litWareconnection) + + Mock -CommandName New-Object -MockWith { + return (@{} | Add-Member -MemberType ScriptMethod IsSynchronizationRunning { + $Global:SPDscUpsSyncIsSynchronizationRunning=$true; + return $false; + } -PassThru | Add-Member ConnectionManager $litwareConnnectionManager -PassThru ) + } -ParameterFilter { $TypeName -eq "Microsoft.Office.Server.UserProfiles.UserProfileConfigManager" } + + It "Should return Ensure Absent from the get method" { + (Get-TargetResource @testParams).Ensure | Should Be "Absent" + } + } } } } From bb412e9c14eeff443ce501152303d457b3999a52 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 12 Jun 2018 10:15:29 -0400 Subject: [PATCH 54/56] Fixes for tests --- ...PointDsc.SPUserProfileServiceApp.Tests.ps1 | 112 +++++++++++++++++- 1 file changed, 110 insertions(+), 2 deletions(-) diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 index 7d8842ec2..bf8721290 100644 --- a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 @@ -75,7 +75,7 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } # Test contexts - Context -Name "When PSDSCRunAsCredential matches the Farm Account" -Fixture { + Context -Name "When PSDSCRunAsCredential matches the Farm Account and Service App is null" -Fixture { $testParams = @{ Name = "User Profile Service App" ApplicationPool = "SharePoint Service Applications" @@ -92,12 +92,120 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { Mock -CommandName Restart-Service {} + It "Should throw exception in the Get method" { + (Get-TargetResource @testParams).Ensure | Should Be "Absent" + } + + It "Should throw exception in the Test method" { + Test-TargetResource @testParams | Should Be $false + } + + It "Should throw exception in the set method" { + { Set-TargetResource @testParams } | Should throw "Specified PSDSCRunAsCredential " + } + } + + Context -Name "When PSDSCRunAsCredential matches the Farm Account and Service App is not null" -Fixture { + $testParams = @{ + Name = "User Profile Service App" + ApplicationPool = "SharePoint Service Applications" + Ensure = "Present" + } + + Mock -CommandName Get-SPDSCFarmAccount -MockWith { + return $mockCredential + } + + Mock -CommandName Get-SPServiceApplication -MockWith { + return @( + New-Object -TypeName "Object" | + Add-Member -MemberType NoteProperty ` + -Name TypeName ` + -Value "User Profile Service Application" ` + -PassThru | + Add-Member -MemberType NoteProperty ` + -Name DisplayName ` + -Value $testParams.Name ` + -PassThru | + Add-Member -MemberType ScriptMethod ` + -Name Update ` + -Value { + $Global:SPDscUPSAUpdateCalled = $true + } -PassThru | + Add-Member -MemberType NoteProperty ` + -Name ApplicationPool ` + -Value @{ + Name = $testParams.ApplicationPool + } -PassThru | + Add-Member -MemberType ScriptMethod ` + -Name GetType ` + -Value { + New-Object -TypeName "Object" | + Add-Member -MemberType NoteProperty ` + -Name FullName ` + -Value $getTypeFullName ` + -PassThru | + Add-Member -MemberType ScriptMethod ` + -Name GetProperties ` + -Value { + param($x) + return @( + (New-Object -TypeName "Object" | + Add-Member -MemberType NoteProperty ` + -Name Name ` + -Value "SocialDatabase" ` + -PassThru | + Add-Member -MemberType ScriptMethod ` + -Name GetValue ` + -Value { + param($x) + return @{ + Name = "SP_SocialDB" + NormalizedDataSource = "SQL.domain.local" + } + } -PassThru + ), + (New-Object -TypeName "Object" | + Add-Member -MemberType NoteProperty ` + -Name Name ` + -Value "ProfileDatabase" ` + -PassThru | + Add-Member -MemberType ScriptMethod ` + -Name GetValue ` + -Value { + return @{ + Name = "SP_ProfileDB" + NormalizedDataSource = "SQL.domain.local" + } + } -PassThru + ), + (New-Object -TypeName "Object" | + Add-Member -MemberType NoteProperty ` + -Name Name ` + -Value "SynchronizationDatabase" ` + -PassThru | + Add-Member -MemberType ScriptMethod ` + -Name GetValue ` + -Value { + return @{ + Name = "SP_ProfileSyncDB" + NormalizedDataSource = "SQL.domain.local" + } + } -PassThru + ) + ) + } -PassThru + } -PassThru -Force + ) + } + Mock -CommandName Restart-Service {} + It "Should NOT throw exception in the Get method" { (Get-TargetResource @testParams).Ensure | Should Be "Present" } It "Should throw exception in the Test method" { - { Test-TargetResource @testParams } | Should throw "Specified PSDSCRunAsCredential " + Test-TargetResource @testParams | Should Be $true } It "Should throw exception in the set method" { From c7acadea0e11acb7d9564e6f31e45261f416d8c0 Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Wed, 13 Jun 2018 09:36:33 +0200 Subject: [PATCH 55/56] v2.3 prep changes --- CHANGELOG.md | 2 +- Modules/SharePointDsc/SharePointDsc.psd1 | 53 +++++++++--------------- 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 238d300eb..b48cc121b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change log for SharePointDsc -## Unreleased +## 2.3 * Changes to SharePointDsc * Added a Branches section to the README.md with Codecov and build badges for diff --git a/Modules/SharePointDsc/SharePointDsc.psd1 b/Modules/SharePointDsc/SharePointDsc.psd1 index 565cb7dbc..8961f5c37 100644 --- a/Modules/SharePointDsc/SharePointDsc.psd1 +++ b/Modules/SharePointDsc/SharePointDsc.psd1 @@ -12,7 +12,7 @@ # RootModule = '' # Version number of this module. -ModuleVersion = '2.2.0.0' +ModuleVersion = '2.3.0.0' # ID used to uniquely identify this module GUID = '6c1176a0-4fac-4134-8ca2-3fa8a21a7b90' @@ -128,40 +128,27 @@ PrivateData = @{ # ReleaseNotes of this module ReleaseNotes = " - * SPAlternateURL - * If resource specifies Central Admin webapp and Default Zone, the existing - AAM will be updated instead of adding a new one - * SPContentDatabase - * Fixed issue where mounting a content database which had to be upgraded - resulted in a reboot. - * SPDistributedCacheClientSettings - * Added the new resource - * SPFarmAdministrators - * Fixed issue where member comparisons was case sensitive. This had - to be case insensitive. - * SPManagedMetadataServiceApp - * Fixed issue with creating the Content Type Hub on an existing MMS - service app without Content Type Hub. - * SPManagedMetadataServiceAppDefault - * Fixed issue where .GetType().FullName and TypeName were not used - properly. + * Changes to SharePointDsc + * Added a Branches section to the README.md with Codecov and build badges for + both master and dev branch. + * All Resources + * Added information about the Resource Type in each ReadMe.md files. + * SPFarm + * Fixed issue where the resource throws an exception if the farm already + exists and the server has been joined using the FQDN (issue 795) * SPTimerJobState - * Updated description of WebAppUrl parameter to make it clear that - N/A has to be used to specify a global timer job. + * Fixed issue where the Set method for timerjobs deployed to multiple web + applications failed. + * SPTrustedIdentityTokenIssuerProviderRealms + * Added the resource. * SPUserProfileServiceApp - * Fixed issue introduced in v2.0, where the Farm Account had to have - local Administrator permissions for the resource to function properly. - * Updated resource to retrieve the Farm account from the Managed Accounts - instead of requiring it as a parameter. - * SPUserProfileSyncService - * Fixed issue introduced in v2.0, where the Farm Account had to have - local Administrator permissions for the resource to function properly. - * Updated resource to retrieve the Farm account from the Managed Accounts - instead of requiring it as a parameter. - * The FarmAccount parameter is deprecated and no longer required. Is ignored - in the code and will be removed in v3.0. - * SPVisioServiceApp - * Fixed an issue where the proxy is not properly getting created + * Now supported specifying the host Managed path, and properly sets the host. + * Changed error for running with Farm Account into being a warning + * SPUserProfileSyncConnection + * Added support for filtering disabled users + * Fixed issue where UseSSL was set to true resulted in an error + * Fixed issue where the connection was recreated when the name contained a + dot (SP2016) " } # End of PSData hashtable From 44dd8075787870cebbb561140c39f53159d6542d Mon Sep 17 00:00:00 2001 From: Yorick Kuijs Date: Wed, 13 Jun 2018 10:22:57 +0200 Subject: [PATCH 56/56] Updated documentation --- .../en-US/about_SPAccessServiceApp.help.txt | 2 + .../en-US/about_SPAlternateUrl.help.txt | 2 + .../en-US/about_SPAntivirusSettings.help.txt | 2 + .../en-US/about_SPAppCatalog.help.txt | 2 + .../en-US/about_SPAppDomain.help.txt | 2 + .../about_SPAppManagementServiceApp.help.txt | 2 + .../en-US/about_SPAppStoreSettings.help.txt | 2 + .../en-US/about_SPBCSServiceApp.help.txt | 2 + .../en-US/about_SPBlobCacheSettings.help.txt | 2 + .../en-US/about_SPCacheAccounts.help.txt | 2 + .../en-US/about_SPConfigWizard.help.txt | 2 + .../en-US/about_SPContentDatabase.help.txt | 2 + .../en-US/about_SPDatabaseAAG.help.txt | 2 + .../en-US/about_SPDesignerSettings.help.txt | 2 + ...about_SPDiagnosticLoggingSettings.help.txt | 2 + .../about_SPDiagnosticsProvider.help.txt | 2 + ..._SPDistributedCacheClientSettings.help.txt | 2 + .../about_SPDistributedCacheService.help.txt | 2 + .../en-US/about_SPExcelServiceApp.help.txt | 2 + .../SharePointDsc/en-US/about_SPFarm.help.txt | 2 + .../en-US/about_SPFarmAdministrators.help.txt | 2 + .../en-US/about_SPFarmPropertyBag.help.txt | 2 + .../en-US/about_SPFarmSolution.help.txt | 2 + .../en-US/about_SPFeature.help.txt | 2 + .../about_SPHealthAnalyzerRuleState.help.txt | 2 + ...bout_SPInfoPathFormsServiceConfig.help.txt | 2 + .../en-US/about_SPInstall.help.txt | 2 + .../about_SPInstallLanguagePack.help.txt | 2 + .../en-US/about_SPInstallPrereqs.help.txt | 2 + .../en-US/about_SPIrmSettings.help.txt | 2 + .../en-US/about_SPLogLevel.help.txt | 2 + ...ut_SPMachineTranslationServiceApp.help.txt | 2 + .../en-US/about_SPManagedAccount.help.txt | 2 + ...about_SPManagedMetaDataServiceApp.help.txt | 2 + ...PManagedMetaDataServiceAppDefault.help.txt | 2 + .../en-US/about_SPManagedPath.help.txt | 2 + .../en-US/about_SPMinRoleCompliance.help.txt | 2 + ...about_SPOfficeOnlineServerBinding.help.txt | 2 + .../about_SPOutgoingEmailSettings.help.txt | 2 + .../about_SPPasswordChangeSettings.help.txt | 2 + ...bout_SPPerformancePointServiceApp.help.txt | 2 + .../en-US/about_SPProductUpdate.help.txt | 2 + ...SPProjectServerADResourcePoolSync.help.txt | 2 + ...SPProjectServerAdditionalSettings.help.txt | 2 + ..._SPProjectServerGlobalPermissions.help.txt | 2 + .../en-US/about_SPProjectServerGroup.help.txt | 2 + .../about_SPProjectServerLicense.help.txt | 2 + ...out_SPProjectServerPermissionMode.help.txt | 2 + .../about_SPProjectServerServiceApp.help.txt | 2 + ..._SPProjectServerTimeSheetSettings.help.txt | 2 + ...t_SPProjectServerUserSyncSettings.help.txt | 2 + .../about_SPProjectServerWssSettings.help.txt | 2 + ...about_SPPublishServiceApplication.help.txt | 2 + .../en-US/about_SPQuotaTemplate.help.txt | 2 + .../en-US/about_SPRemoteFarmTrust.help.txt | 2 + .../about_SPSearchAuthoritativePage.help.txt | 2 + .../about_SPSearchContentSource.help.txt | 2 + .../en-US/about_SPSearchCrawlMapping.help.txt | 2 + .../en-US/about_SPSearchCrawlRule.help.txt | 2 + .../about_SPSearchCrawlerImpactRule.help.txt | 2 + .../en-US/about_SPSearchFileType.help.txt | 2 + .../about_SPSearchIndexPartition.help.txt | 2 + .../en-US/about_SPSearchResultSource.help.txt | 2 + .../en-US/about_SPSearchServiceApp.help.txt | 2 + .../en-US/about_SPSearchTopology.help.txt | 2 + .../about_SPSecureStoreServiceApp.help.txt | 2 + ...bout_SPSecurityTokenServiceConfig.help.txt | 2 + .../en-US/about_SPServiceAppPool.help.txt | 2 + .../about_SPServiceAppProxyGroup.help.txt | 2 + .../en-US/about_SPServiceAppSecurity.help.txt | 2 + .../en-US/about_SPServiceIdentity.help.txt | 2 + .../en-US/about_SPServiceInstance.help.txt | 2 + .../about_SPSessionStateService.help.txt | 2 + .../en-US/about_SPShellAdmins.help.txt | 2 + .../SharePointDsc/en-US/about_SPSite.help.txt | 2 + .../en-US/about_SPStateServiceApp.help.txt | 2 + ..._SPSubscriptionSettingsServiceApp.help.txt | 2 + .../en-US/about_SPTimerJobState.help.txt | 2 + ...bout_SPTrustedIdentityTokenIssuer.help.txt | 2 + ...IdentityTokenIssuerProviderRealms.help.txt | 207 ++++++++++++++++++ .../en-US/about_SPUsageApplication.help.txt | 2 + .../about_SPUserProfileProperty.help.txt | 2 + .../en-US/about_SPUserProfileSection.help.txt | 2 + .../about_SPUserProfileServiceApp.help.txt | 12 +- ...PUserProfileServiceAppPermissions.help.txt | 2 + ...about_SPUserProfileSyncConnection.help.txt | 10 + .../about_SPUserProfileSyncService.help.txt | 2 + .../en-US/about_SPVisioServiceApp.help.txt | 2 + .../SharePointDsc/en-US/about_SPWeb.help.txt | 2 + .../about_SPWebAppAuthentication.help.txt | 2 + .../about_SPWebAppBlockedFileTypes.help.txt | 2 + .../about_SPWebAppGeneralSettings.help.txt | 2 + ...bout_SPWebAppPeoplePickerSettings.help.txt | 2 + .../en-US/about_SPWebAppPermissions.help.txt | 2 + .../en-US/about_SPWebAppPolicy.help.txt | 2 + .../en-US/about_SPWebAppProxyGroup.help.txt | 2 + .../about_SPWebAppSiteUseAndDeletion.help.txt | 2 + .../en-US/about_SPWebAppSuiteBar.help.txt | 2 + .../about_SPWebAppThrottlingSettings.help.txt | 2 + .../about_SPWebAppWorkflowSettings.help.txt | 2 + .../en-US/about_SPWebApplication.help.txt | 2 + .../about_SPWebApplicationAppDomain.help.txt | 2 + .../about_SPWebApplicationExtension.help.txt | 2 + .../about_SPWordAutomationServiceApp.help.txt | 2 + .../about_SPWorkManagementServiceApp.help.txt | 2 + .../en-US/about_SPWorkflowService.help.txt | 2 + 106 files changed, 433 insertions(+), 2 deletions(-) create mode 100644 Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuerProviderRealms.help.txt diff --git a/Modules/SharePointDsc/en-US/about_SPAccessServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPAccessServiceApp.help.txt index af0142a8a..7c47d5fd6 100644 --- a/Modules/SharePointDsc/en-US/about_SPAccessServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPAccessServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for creating Access Services Application instances within the local SharePoint farm. The resource will provision and configure the Access Services Service Application. diff --git a/Modules/SharePointDsc/en-US/about_SPAlternateUrl.help.txt b/Modules/SharePointDsc/en-US/about_SPAlternateUrl.help.txt index 028f892bf..adf0e202c 100644 --- a/Modules/SharePointDsc/en-US/about_SPAlternateUrl.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPAlternateUrl.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to define an alternate access mapping URL for a specified web application. These can be assigned to specific zones for each web application. Alternatively a URL can be removed from a zone to ensure that it diff --git a/Modules/SharePointDsc/en-US/about_SPAntivirusSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPAntivirusSettings.help.txt index e5310458b..a311bd156 100644 --- a/Modules/SharePointDsc/en-US/about_SPAntivirusSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPAntivirusSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to set the global antivirus settings for the local farm. These settings will be used to control the behavior of an external anti-virus scanning tool that is able to integrate with SharePoint. Note that this will diff --git a/Modules/SharePointDsc/en-US/about_SPAppCatalog.help.txt b/Modules/SharePointDsc/en-US/about_SPAppCatalog.help.txt index 7503bc167..c363e0214 100644 --- a/Modules/SharePointDsc/en-US/about_SPAppCatalog.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPAppCatalog.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will ensure that a specific site collection is marked as the app catalog for the web application that the site is in. The catalog site needs to have been created using the correct template (APPCATALOG#0). diff --git a/Modules/SharePointDsc/en-US/about_SPAppDomain.help.txt b/Modules/SharePointDsc/en-US/about_SPAppDomain.help.txt index a0dd1da87..522632ebf 100644 --- a/Modules/SharePointDsc/en-US/about_SPAppDomain.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPAppDomain.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will set the value for the app domain settings at the farm level. You can set the domain name and the prefix that is to be used for app URLs. diff --git a/Modules/SharePointDsc/en-US/about_SPAppManagementServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPAppManagementServiceApp.help.txt index db0141d21..3782a62e2 100644 --- a/Modules/SharePointDsc/en-US/about_SPAppManagementServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPAppManagementServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to provision and manage an instance of the App Management Services Service Application. It will identify an instance of the app management service application through the application display name. Currently diff --git a/Modules/SharePointDsc/en-US/about_SPAppStoreSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPAppStoreSettings.help.txt index 20fc57d6c..1f0c44782 100644 --- a/Modules/SharePointDsc/en-US/about_SPAppStoreSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPAppStoreSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will configure the ability to purchase apps for both SharePoint and Office apps. diff --git a/Modules/SharePointDsc/en-US/about_SPBCSServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPBCSServiceApp.help.txt index 1b31735eb..11a901a7b 100644 --- a/Modules/SharePointDsc/en-US/about_SPBCSServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPBCSServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to provision and manage an instance of the Business Connectivity Services Service Application. It will identify an instance of the BCS app through the application display name. Currently the resource diff --git a/Modules/SharePointDsc/en-US/about_SPBlobCacheSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPBlobCacheSettings.help.txt index fb91f98c1..682705314 100644 --- a/Modules/SharePointDsc/en-US/about_SPBlobCacheSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPBlobCacheSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Specific + This resource is used to configure the Blob Cache settings for a web application. diff --git a/Modules/SharePointDsc/en-US/about_SPCacheAccounts.help.txt b/Modules/SharePointDsc/en-US/about_SPCacheAccounts.help.txt index cdc335f2d..7545cc4bd 100644 --- a/Modules/SharePointDsc/en-US/about_SPCacheAccounts.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPCacheAccounts.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to set the "super user" and "super reader" cache accounts for the specified web application object (as described in the TechNet article [Configure object cache user accounts in SharePoint Server 2013](https://technet.microsoft.com/en-us/library/ff758656.aspx)). diff --git a/Modules/SharePointDsc/en-US/about_SPConfigWizard.help.txt b/Modules/SharePointDsc/en-US/about_SPConfigWizard.help.txt index c61bfe6e6..8cd498ddc 100644 --- a/Modules/SharePointDsc/en-US/about_SPConfigWizard.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPConfigWizard.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Utility + This resource is used to perform the upgrade step of installing SharePoint updates, like Cumulative Updates, Service Packs and Language Packs. The DatabaseUpgradeDays and DatabaseUpgradeTime parameters specify a window in diff --git a/Modules/SharePointDsc/en-US/about_SPContentDatabase.help.txt b/Modules/SharePointDsc/en-US/about_SPContentDatabase.help.txt index c0ca49d45..ec5888af0 100644 --- a/Modules/SharePointDsc/en-US/about_SPContentDatabase.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPContentDatabase.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to add and remove Content Databases to web applications and configure these databases. diff --git a/Modules/SharePointDsc/en-US/about_SPDatabaseAAG.help.txt b/Modules/SharePointDsc/en-US/about_SPDatabaseAAG.help.txt index 834c30c21..dab04d597 100644 --- a/Modules/SharePointDsc/en-US/about_SPDatabaseAAG.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPDatabaseAAG.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will allow specifying which SQL Server AlwaysOn Availability group a resource should be in. This resource does not configure the Availability Groups on SQL Server, they must already exist. It simply adds diff --git a/Modules/SharePointDsc/en-US/about_SPDesignerSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPDesignerSettings.help.txt index 29abe027d..b6337b942 100644 --- a/Modules/SharePointDsc/en-US/about_SPDesignerSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPDesignerSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to set the SharePoint Designer settings for the local farm or site collections. These settings will be used to control if users are allowed to make changes using SharePoint Designer. Note that this will not diff --git a/Modules/SharePointDsc/en-US/about_SPDiagnosticLoggingSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPDiagnosticLoggingSettings.help.txt index b66029c17..a7ac89ff3 100644 --- a/Modules/SharePointDsc/en-US/about_SPDiagnosticLoggingSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPDiagnosticLoggingSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for configuring settings to do with the diagnostic (ULS) logging on servers in the farm. These settings are applied to the diagnostic logging service for the farm and do not need to be applied to each diff --git a/Modules/SharePointDsc/en-US/about_SPDiagnosticsProvider.help.txt b/Modules/SharePointDsc/en-US/about_SPDiagnosticsProvider.help.txt index 3db3722f9..43b0acf98 100644 --- a/Modules/SharePointDsc/en-US/about_SPDiagnosticsProvider.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPDiagnosticsProvider.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for configuring the Diagnostics Provider within the local SharePoint farm. Using Ensure equals to Absent is not supported. This resource can only apply configuration, not ensure they don't exist. diff --git a/Modules/SharePointDsc/en-US/about_SPDistributedCacheClientSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPDistributedCacheClientSettings.help.txt index 0acd30fb3..acf3d850b 100644 --- a/Modules/SharePointDsc/en-US/about_SPDistributedCacheClientSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPDistributedCacheClientSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for configuring the distributed cache client settings. It only accepts Ensure='Present' as a key. The resource can configure the following cache components: DistributedLogonTokenCache, diff --git a/Modules/SharePointDsc/en-US/about_SPDistributedCacheService.help.txt b/Modules/SharePointDsc/en-US/about_SPDistributedCacheService.help.txt index f68a80185..5210953af 100644 --- a/Modules/SharePointDsc/en-US/about_SPDistributedCacheService.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPDistributedCacheService.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Specific + This resource is responsible for provisioning the distributed cache to the service it runs on. This is required in your farm on at least one server (as the behavior of SPCreateFarm and SPJoinFarm is to not enroll every server as a diff --git a/Modules/SharePointDsc/en-US/about_SPExcelServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPExcelServiceApp.help.txt index 45dea7a37..4a95d56dc 100644 --- a/Modules/SharePointDsc/en-US/about_SPExcelServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPExcelServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for creating Excel Services Application instances within the local SharePoint farm. The resource will provision and configure the Excel Services Service Application. diff --git a/Modules/SharePointDsc/en-US/about_SPFarm.help.txt b/Modules/SharePointDsc/en-US/about_SPFarm.help.txt index b433f1629..c0ce3ae8a 100644 --- a/Modules/SharePointDsc/en-US/about_SPFarm.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPFarm.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Specific + This resource is used to create a new SharePoint farm and allow servers to join that farm. It will detect the presence of the configuration database on the SQL server as a first step, and if it does not exist then the farm diff --git a/Modules/SharePointDsc/en-US/about_SPFarmAdministrators.help.txt b/Modules/SharePointDsc/en-US/about_SPFarmAdministrators.help.txt index 96503b5a9..4820892b7 100644 --- a/Modules/SharePointDsc/en-US/about_SPFarmAdministrators.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPFarmAdministrators.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Common + This resource is used to manage the membership of the farm administrators group. There are a number of approaches to how this can be implemented. The "members" property will set a specific list of members for the group, making diff --git a/Modules/SharePointDsc/en-US/about_SPFarmPropertyBag.help.txt b/Modules/SharePointDsc/en-US/about_SPFarmPropertyBag.help.txt index 0644d0bb4..c2e12c59d 100644 --- a/Modules/SharePointDsc/en-US/about_SPFarmPropertyBag.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPFarmPropertyBag.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to work with SharePoint Property Bags at the farm level. The account that runs this resource must be a farm administrator. diff --git a/Modules/SharePointDsc/en-US/about_SPFarmSolution.help.txt b/Modules/SharePointDsc/en-US/about_SPFarmSolution.help.txt index 89c6517d3..6bfc8c997 100644 --- a/Modules/SharePointDsc/en-US/about_SPFarmSolution.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPFarmSolution.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to make sure that a specific farm solution is either present or absent in a farm. The solution can be deployed to one or more web application passing an array of URL's to the WebApplications property. If the diff --git a/Modules/SharePointDsc/en-US/about_SPFeature.help.txt b/Modules/SharePointDsc/en-US/about_SPFeature.help.txt index 11006c2ee..aee7301c4 100644 --- a/Modules/SharePointDsc/en-US/about_SPFeature.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPFeature.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to make sure that a specific feature is either enabled or disabled at a given URL/scope. The Ensure property will dictate if the feature should be on or off. The name property is the name of the feature diff --git a/Modules/SharePointDsc/en-US/about_SPHealthAnalyzerRuleState.help.txt b/Modules/SharePointDsc/en-US/about_SPHealthAnalyzerRuleState.help.txt index cf4d28a54..9373405b9 100644 --- a/Modules/SharePointDsc/en-US/about_SPHealthAnalyzerRuleState.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPHealthAnalyzerRuleState.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to configure Health Analyzer rules for the local farm. The resource is able to enable/disable and configure the specified rule. diff --git a/Modules/SharePointDsc/en-US/about_SPInfoPathFormsServiceConfig.help.txt b/Modules/SharePointDsc/en-US/about_SPInfoPathFormsServiceConfig.help.txt index c8115f783..a3f29c642 100644 --- a/Modules/SharePointDsc/en-US/about_SPInfoPathFormsServiceConfig.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPInfoPathFormsServiceConfig.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for configuring the InfoPath Forms service within the local SharePoint farm. Using Ensure equals to Absent is not supported. This resource can only apply configuration, not ensure they don't exist. diff --git a/Modules/SharePointDsc/en-US/about_SPInstall.help.txt b/Modules/SharePointDsc/en-US/about_SPInstall.help.txt index 4023dd69b..64379e38d 100644 --- a/Modules/SharePointDsc/en-US/about_SPInstall.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPInstall.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Common + This resource is used to install the SharePoint binaries. The BinaryDir parameter should point to the path that setup.exe is located (not to setup.exe itself). The ProductKey parameter is used to inject in to the configuration diff --git a/Modules/SharePointDsc/en-US/about_SPInstallLanguagePack.help.txt b/Modules/SharePointDsc/en-US/about_SPInstallLanguagePack.help.txt index 359d97f42..86c7283e9 100644 --- a/Modules/SharePointDsc/en-US/about_SPInstallLanguagePack.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPInstallLanguagePack.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to install the SharePoint Language Pack binaries. The BinaryDir parameter should point to the path that setup.exe is located (not to setup.exe itself). diff --git a/Modules/SharePointDsc/en-US/about_SPInstallPrereqs.help.txt b/Modules/SharePointDsc/en-US/about_SPInstallPrereqs.help.txt index 941c143e2..384b1e13a 100644 --- a/Modules/SharePointDsc/en-US/about_SPInstallPrereqs.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPInstallPrereqs.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Common + This resource is responsible for ensuring the installation of all SharePoint prerequisites. It makes use of the PrerequisiteInstaller.exe file that is part of the SharePoint binaries, and will install the required Windows features as diff --git a/Modules/SharePointDsc/en-US/about_SPIrmSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPIrmSettings.help.txt index bb52a8c22..fdd87143b 100644 --- a/Modules/SharePointDsc/en-US/about_SPIrmSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPIrmSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to manipulate the IRM settings in SharePoint, integrating it with AD RMS diff --git a/Modules/SharePointDsc/en-US/about_SPLogLevel.help.txt b/Modules/SharePointDsc/en-US/about_SPLogLevel.help.txt index 38a07ab28..8ecc0003f 100644 --- a/Modules/SharePointDsc/en-US/about_SPLogLevel.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPLogLevel.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to change the minimum severity of events captured in the trace logs (ULS logs) and the Windows event logs. Settings can be changed globally for all areas and categories (using the '*' character as the diff --git a/Modules/SharePointDsc/en-US/about_SPMachineTranslationServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPMachineTranslationServiceApp.help.txt index 49d9aaf11..92cc49c62 100644 --- a/Modules/SharePointDsc/en-US/about_SPMachineTranslationServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPMachineTranslationServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to provision and manage an instance of the Machine Translation Service Application. It will identify an instance of the MT app through the application display name. Currently the resource will diff --git a/Modules/SharePointDsc/en-US/about_SPManagedAccount.help.txt b/Modules/SharePointDsc/en-US/about_SPManagedAccount.help.txt index 2db706949..38738833a 100644 --- a/Modules/SharePointDsc/en-US/about_SPManagedAccount.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPManagedAccount.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will ensure a managed account is provisioned in to the SharePoint farm. The Account object specific the credential to store (including username and password) to set as the managed account. The settings for diff --git a/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceApp.help.txt index f19624695..62362444e 100644 --- a/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + Creates a managed metadata service application. The application pool property specifies which application pool it should use, and will reset the application back to this pool if it is changed after its initial provisioning. The diff --git a/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceAppDefault.help.txt b/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceAppDefault.help.txt index abdc6a780..551c38276 100644 --- a/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceAppDefault.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPManagedMetaDataServiceAppDefault.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + Using several managed metadata service instances in a farm requires some configuration, which service application proxy should be used as default for keywords or site collection specific term sets. diff --git a/Modules/SharePointDsc/en-US/about_SPManagedPath.help.txt b/Modules/SharePointDsc/en-US/about_SPManagedPath.help.txt index 387889cd9..aba74df6b 100644 --- a/Modules/SharePointDsc/en-US/about_SPManagedPath.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPManagedPath.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for creating managed paths associated with a specific web application. The WebAppUrl parameter is used to specify the web application to create the path against, and the RelativeUrl parameter lets you diff --git a/Modules/SharePointDsc/en-US/about_SPMinRoleCompliance.help.txt b/Modules/SharePointDsc/en-US/about_SPMinRoleCompliance.help.txt index ce973c212..3f7776d9f 100644 --- a/Modules/SharePointDsc/en-US/about_SPMinRoleCompliance.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPMinRoleCompliance.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Utility + This resource will help manage compliance of MinRole based servers. Each time the resource runs it will investigate which service instances should be running based on the role of servers anywhere in the farm, and if they are not in a diff --git a/Modules/SharePointDsc/en-US/about_SPOfficeOnlineServerBinding.help.txt b/Modules/SharePointDsc/en-US/about_SPOfficeOnlineServerBinding.help.txt index f2a0d5e05..82a1c2487 100644 --- a/Modules/SharePointDsc/en-US/about_SPOfficeOnlineServerBinding.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPOfficeOnlineServerBinding.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will create a binding to an Office Online Server (formerly known as Office Web Apps). The DnsName property can be a single server name, or a FQDN of a load balanced end point that will direct traffic to a farm. diff --git a/Modules/SharePointDsc/en-US/about_SPOutgoingEmailSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPOutgoingEmailSettings.help.txt index 9e4cf8da6..cd4886d7d 100644 --- a/Modules/SharePointDsc/en-US/about_SPOutgoingEmailSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPOutgoingEmailSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to set the outgoing email settings for either a single web application, or the whole farm. To configure the resource for a specific web app, use the URL of the web application for the WebAppUrl property, to diff --git a/Modules/SharePointDsc/en-US/about_SPPasswordChangeSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPPasswordChangeSettings.help.txt index e10906845..344e716c6 100644 --- a/Modules/SharePointDsc/en-US/about_SPPasswordChangeSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPPasswordChangeSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to control settings that relate to the automatic changing of passwords for managed accounts (where they opt-in to be managed by SharePoint). These settings can be manually controlled through central diff --git a/Modules/SharePointDsc/en-US/about_SPPerformancePointServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPPerformancePointServiceApp.help.txt index f3eb083f8..40a9da043 100644 --- a/Modules/SharePointDsc/en-US/about_SPPerformancePointServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPPerformancePointServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for creating Performance Point Service Application instances within the local SharePoint farm. The resource will provision and configure the Performance Point Service Application. diff --git a/Modules/SharePointDsc/en-US/about_SPProductUpdate.help.txt b/Modules/SharePointDsc/en-US/about_SPProductUpdate.help.txt index 907f29fdc..b244788f4 100644 --- a/Modules/SharePointDsc/en-US/about_SPProductUpdate.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProductUpdate.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Common + This resource is used to perform the update step of installing SharePoint updates, like Cumulative Updates and Service Packs. The SetupFile parameter should point to the update file. The ShutdownServices parameter is used to diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerADResourcePoolSync.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerADResourcePoolSync.help.txt index 7147c5960..35d5372e4 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerADResourcePoolSync.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerADResourcePoolSync.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to control the settings of the Active Directory resource pool sync for Project Server, for a specific PWA instance. You can control which AD groups should be imported from and control diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerAdditionalSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerAdditionalSettings.help.txt index e02d683e2..fd3114aea 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerAdditionalSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerAdditionalSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to manage the "additional settings" for a PWA instance (based on what is in the 'additional settings' page of the web interface). diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerGlobalPermissions.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerGlobalPermissions.help.txt index 59c0931ea..0beb81a13 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerGlobalPermissions.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerGlobalPermissions.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource allows you to enforce global permissions in a PWA site for a specific project server group or an individual resource. diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerGroup.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerGroup.help.txt index c030fcb3c..f6a67953d 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerGroup.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerGroup.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to configure a group within Project Server. This is only available for use when the site is configured to use Project Server permissions mode and for Project Server 2016 only. diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerLicense.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerLicense.help.txt index 153c3aaf4..c22b21e95 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerLicense.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerLicense.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to enable a Project Server license in to a SharePoint 2016 farm. diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerPermissionMode.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerPermissionMode.help.txt index 45413e163..e73d6e644 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerPermissionMode.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerPermissionMode.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource allows you to set the permissions mode (either SharePoint or ProjectServer) for a specific project server site. diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerServiceApp.help.txt index 0e54a440b..cbc06e397 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for provisioning and managing the Project Server service application in SharePoint Server 2016. diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerTimeSheetSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerTimeSheetSettings.help.txt index b30c3291c..a53f30310 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerTimeSheetSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerTimeSheetSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + Allows you to configure the default timesheet settings for a specific PWA instance. diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerUserSyncSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerUserSyncSettings.help.txt index 4390aa386..3ce3df5c2 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerUserSyncSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerUserSyncSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for configuration of the user sync settings between projects and project sites. diff --git a/Modules/SharePointDsc/en-US/about_SPProjectServerWssSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPProjectServerWssSettings.help.txt index 2b2fe458e..575397561 100644 --- a/Modules/SharePointDsc/en-US/about_SPProjectServerWssSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPProjectServerWssSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to control settings that relate to the SharePoint sites that are linked to projects in Project Server. diff --git a/Modules/SharePointDsc/en-US/about_SPPublishServiceApplication.help.txt b/Modules/SharePointDsc/en-US/about_SPPublishServiceApplication.help.txt index 8163fcefa..dfa1ad01d 100644 --- a/Modules/SharePointDsc/en-US/about_SPPublishServiceApplication.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPPublishServiceApplication.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to specify if a specific service application should be published (Ensure = "Present") or not published (Ensure = "Absent") on the current server. The name is the display name of the service application as diff --git a/Modules/SharePointDsc/en-US/about_SPQuotaTemplate.help.txt b/Modules/SharePointDsc/en-US/about_SPQuotaTemplate.help.txt index e5c9a3473..ca4dd1e9f 100644 --- a/Modules/SharePointDsc/en-US/about_SPQuotaTemplate.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPQuotaTemplate.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to configure quota templates in the farm. These settings will be used to make sure a certain quota template exists or not. When it exists, it will also make sure the settings are configured as specified. diff --git a/Modules/SharePointDsc/en-US/about_SPRemoteFarmTrust.help.txt b/Modules/SharePointDsc/en-US/about_SPRemoteFarmTrust.help.txt index 18b12dcf4..fe892a933 100644 --- a/Modules/SharePointDsc/en-US/about_SPRemoteFarmTrust.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPRemoteFarmTrust.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to trust a remote SharePoint farm. This is used when federating search results between two different SharePoint farms. The technique is described at diff --git a/Modules/SharePointDsc/en-US/about_SPSearchAuthoritativePage.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchAuthoritativePage.help.txt index 2bcee98a1..9164a96d9 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchAuthoritativePage.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchAuthoritativePage.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for managing the search authoritative pages in the search service application. You can create new pages, change existing pages and remove existing pages. diff --git a/Modules/SharePointDsc/en-US/about_SPSearchContentSource.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchContentSource.help.txt index 1b0d8cdc8..eb5f41447 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchContentSource.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchContentSource.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will deploy and configure a content source in a specified search service application. diff --git a/Modules/SharePointDsc/en-US/about_SPSearchCrawlMapping.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchCrawlMapping.help.txt index 5722696ee..0ce04c2b1 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchCrawlMapping.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchCrawlMapping.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for managing the search crawl mapping in the search service application. You can create new mappings, change existing mappings and remove existing mappings. diff --git a/Modules/SharePointDsc/en-US/about_SPSearchCrawlRule.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchCrawlRule.help.txt index b8ad9d357..b21158382 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchCrawlRule.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchCrawlRule.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for managing the search crawl rules in the search service application. You can create new rules, change existing rules and remove existing rules. diff --git a/Modules/SharePointDsc/en-US/about_SPSearchCrawlerImpactRule.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchCrawlerImpactRule.help.txt index f6dbc8c59..a1765d510 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchCrawlerImpactRule.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchCrawlerImpactRule.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for managing the search crawl impact rules in the search service application. You can create new rules, change existing rules and remove existing rules. diff --git a/Modules/SharePointDsc/en-US/about_SPSearchFileType.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchFileType.help.txt index e90e7fa9b..6c027f7fb 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchFileType.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchFileType.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for managing the search file types in the search service application. You can create new file types, change existing types and remove existing file types. diff --git a/Modules/SharePointDsc/en-US/about_SPSearchIndexPartition.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchIndexPartition.help.txt index e6b3f15e0..8be8cbeb6 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchIndexPartition.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchIndexPartition.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for creating search indexes. It works by creating the index topology components and updating the topology from the server that runs this resource. For this reason this resource only needs to run from one diff --git a/Modules/SharePointDsc/en-US/about_SPSearchResultSource.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchResultSource.help.txt index 87ce4c00a..831637c09 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchResultSource.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchResultSource.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to configure search result sources in the SharePoint search service application. Result sources can be configured to be of the following provider types: diff --git a/Modules/SharePointDsc/en-US/about_SPSearchServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchServiceApp.help.txt index 08e56ad36..90bc720ee 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for provisioning the search service application. The current version lets you specify the database name and server, as well as the application pool. If the application pool is changed the DSC resource will diff --git a/Modules/SharePointDsc/en-US/about_SPSearchTopology.help.txt b/Modules/SharePointDsc/en-US/about_SPSearchTopology.help.txt index 0e548e5fb..0fc94c07a 100644 --- a/Modules/SharePointDsc/en-US/about_SPSearchTopology.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSearchTopology.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for provisioning a search topology in to the current farm. It allows the configuration to dictate the search topology roles that the current server should be running. Any combination of roles can be diff --git a/Modules/SharePointDsc/en-US/about_SPSecureStoreServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPSecureStoreServiceApp.help.txt index dcd0d8d78..bf5f94015 100644 --- a/Modules/SharePointDsc/en-US/about_SPSecureStoreServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSecureStoreServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for provisioning and configuring the secure store service application. The parameters passed in (except those related to database specifics) are validated and set when the resource is run, the database values diff --git a/Modules/SharePointDsc/en-US/about_SPSecurityTokenServiceConfig.help.txt b/Modules/SharePointDsc/en-US/about_SPSecurityTokenServiceConfig.help.txt index c6ef7dff7..0812616ea 100644 --- a/Modules/SharePointDsc/en-US/about_SPSecurityTokenServiceConfig.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSecurityTokenServiceConfig.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for configuring the Security Token Service within the local SharePoint farm. Using Ensure equals to Absent is not supported. This resource can only apply configuration, not ensure they don't exist. diff --git a/Modules/SharePointDsc/en-US/about_SPServiceAppPool.help.txt b/Modules/SharePointDsc/en-US/about_SPServiceAppPool.help.txt index 9f03c2ae0..7a61d86f7 100644 --- a/Modules/SharePointDsc/en-US/about_SPServiceAppPool.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPServiceAppPool.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used for provisioning an application pool that can be used for service applications. The account used for the service account must already be registered as a managed account (which can be provisioned through diff --git a/Modules/SharePointDsc/en-US/about_SPServiceAppProxyGroup.help.txt b/Modules/SharePointDsc/en-US/about_SPServiceAppProxyGroup.help.txt index c1e52446c..998180edb 100644 --- a/Modules/SharePointDsc/en-US/about_SPServiceAppProxyGroup.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPServiceAppProxyGroup.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to manage SharePoint Service Application Proxy Groups. The "Ensure" parameter controls whether or not the Proxy Group should exist. A proxy group cannot be removed if a web application is using it. The diff --git a/Modules/SharePointDsc/en-US/about_SPServiceAppSecurity.help.txt b/Modules/SharePointDsc/en-US/about_SPServiceAppSecurity.help.txt index 01a0291ca..0e92c08a2 100644 --- a/Modules/SharePointDsc/en-US/about_SPServiceAppSecurity.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPServiceAppSecurity.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to manage the sharing security settings of a specific service application. There are a number of approaches to how this can be implemented. Firstly you can set permissions for the app administrators, or diff --git a/Modules/SharePointDsc/en-US/about_SPServiceIdentity.help.txt b/Modules/SharePointDsc/en-US/about_SPServiceIdentity.help.txt index 01ee465b2..49c7fea1c 100644 --- a/Modules/SharePointDsc/en-US/about_SPServiceIdentity.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPServiceIdentity.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to specify a managed account to be used to run a service instance. You can also specify LocalService, LocalSystem or NetworkService as ManagedAccount. The name is the typename of the service as shown in the Central Admin website. diff --git a/Modules/SharePointDsc/en-US/about_SPServiceInstance.help.txt b/Modules/SharePointDsc/en-US/about_SPServiceInstance.help.txt index 5fd3ee114..6296109a1 100644 --- a/Modules/SharePointDsc/en-US/about_SPServiceInstance.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPServiceInstance.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Specific + This resource is used to specify if a specific service should be running (Ensure = "Present") or not running (Ensure = "Absent") on the current server. The name is the display name of the service as shown in the Central Admin diff --git a/Modules/SharePointDsc/en-US/about_SPSessionStateService.help.txt b/Modules/SharePointDsc/en-US/about_SPSessionStateService.help.txt index 8949c9c96..873001830 100644 --- a/Modules/SharePointDsc/en-US/about_SPSessionStateService.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSessionStateService.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will provision a state service app to the local farm. Specify the name of the database server and database name to provision the app with, and optionally include the session timeout value. If session timeout is not diff --git a/Modules/SharePointDsc/en-US/about_SPShellAdmins.help.txt b/Modules/SharePointDsc/en-US/about_SPShellAdmins.help.txt index a6fef1af9..d7978dd38 100644 --- a/Modules/SharePointDsc/en-US/about_SPShellAdmins.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPShellAdmins.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to manage the users with Shell Admin permissions. There are a number of approaches to how this can be implemented. The "Members" property will set a specific list of members for the group, making sure that diff --git a/Modules/SharePointDsc/en-US/about_SPSite.help.txt b/Modules/SharePointDsc/en-US/about_SPSite.help.txt index 2fce6342c..4e6a6487a 100644 --- a/Modules/SharePointDsc/en-US/about_SPSite.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSite.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will provision a site collection to the current farm, based on the settings that are passed through. These settings map to the New-SPSite cmdlet and accept the same values and types. diff --git a/Modules/SharePointDsc/en-US/about_SPStateServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPStateServiceApp.help.txt index ad167064f..3f86c150a 100644 --- a/Modules/SharePointDsc/en-US/about_SPStateServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPStateServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource provisions an instance of the state service in to the local farm. The database specific parameters are only used during initial provisioning of the app, and will not change database settings beyond the initial deployment. diff --git a/Modules/SharePointDsc/en-US/about_SPSubscriptionSettingsServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPSubscriptionSettingsServiceApp.help.txt index 5cfe78035..48fa80533 100644 --- a/Modules/SharePointDsc/en-US/about_SPSubscriptionSettingsServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPSubscriptionSettingsServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to provision and manage an instance of the App Management Services Service Application. It will identify an instance of the subscription settings service app through the application display name. Currently the diff --git a/Modules/SharePointDsc/en-US/about_SPTimerJobState.help.txt b/Modules/SharePointDsc/en-US/about_SPTimerJobState.help.txt index 3c1cc7b3a..95c14b49f 100644 --- a/Modules/SharePointDsc/en-US/about_SPTimerJobState.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPTimerJobState.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to configure a timer job and make sure it is in a specific state. The resource can be used to enable or disabled the job and configure the schedule of the job. diff --git a/Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuer.help.txt b/Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuer.help.txt index d184884a5..4987bc90d 100644 --- a/Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuer.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuer.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to create or remove SPTrustedIdentityTokenIssuer in a SharePoint farm. diff --git a/Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuerProviderRealms.help.txt b/Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuerProviderRealms.help.txt new file mode 100644 index 000000000..837832af7 --- /dev/null +++ b/Modules/SharePointDsc/en-US/about_SPTrustedIdentityTokenIssuerProviderRealms.help.txt @@ -0,0 +1,207 @@ +.NAME + SPTrustedIdentityTokenIssuerProviderRealms + +# Description + + **Type:** Distributed + + This resource is used to add or remove provider realms to + SPTrustedIdentityTokenIssuer in a SharePoint farm. The "ProviderRealms" + property will set a specific list of realms, making sure + that every realm in the list is set and all others that are + already configured but not in this list will be removed. + The "ProviderRealmsToInclude" and "ProviderRealmsToExclude" properties + will allow you to control a specific set of realms to add or remove, + without changing any other realms that are set already. Include and + Exclude can be combined together. RealmUrl is the key and should be + unique, otherwise existing RealmUrn value will be updated/replaced. + +.PARAMETER IssuerName + Key - String + Name of the SPTrustedIdentityTokenIssuer + +.PARAMETER ProviderRealms + Write - String + Realms to set. Those not in this list will be removed + +.PARAMETER ProviderRealmsToInclude + Write - String + Realms to add. Realms not in this list will be left + +.PARAMETER ProviderRealmsToExclude + Write - String + Realms to remove. Realms not in this list will be left + +.PARAMETER Ensure + Write - String + Allowed values: Present, Absent + Present if the ProviderRealms should be created, or Absent if it should be removed + +.PARAMETER InstallAccount + Write - String + POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 + + +.EXAMPLE + This example adds provider realms to existing trusted token issuer. + Existing will be removed. + + +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + $ProviderRealms = @() + $ProviderRealms += MSFT_SPProviderRealm { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealms += MSFT_SPProviderRealm { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1OverwriteExample + { + IssuerName = "Contoso" + ProviderRealms = $ProviderRealms + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } +} + + +.EXAMPLE + This example adds provider realms to existing trusted token issuer. + Existing are left and not removed. + + +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + + $ProviderRealmsToInclude = @() + $ProviderRealmsToInclude += MSFT_SPProviderRealm { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealmsToInclude += MSFT_SPProviderRealm { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1IncludeExample + { + IssuerName = "Contoso" + ProviderRealmsToInclude = $ProviderRealmsToInclude + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } +} + + +.EXAMPLE + This example excludes provider realms from + existing trusted token issuer. + Existing and not excluded are left and not removed. + + +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + $ProviderRealmsToExclude = @() + $ProviderRealmsToExclude += MSFT_SPProviderRealm { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealmsToExclude += MSFT_SPProviderRealm { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1ExcludeExample + { + IssuerName = "Contoso" + ProviderRealmsToExclude = $ProviderRealmsToExclude + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } +} + + +.EXAMPLE + This example includes and excludes provider realms + from existing trusted token issuer. + Existing and not excluded are left and not removed. + + +Configuration Example +{ + param( + [Parameter(Mandatory = $true)] + [PSCredential] + $SetupAccount + ) + Import-DscResource -ModuleName SharePointDsc + + node localhost { + $ProviderRealmsToInclude = @() + $ProviderRealmsToInclude += MSFT_SPProviderRealm { + RealmUrl = "https://search.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search" + } + + $ProviderRealmsToInclude += MSFT_SPProviderRealm { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + $ProviderRealmsToExclude = @() + $ProviderRealmsToExclude += MSFT_SPProviderRealm { + RealmUrl = "https://search1.contoso.com" + RealmUrn = "urn:sharepoint:contoso:search1" + } + + $ProviderRealmsToExclude += MSFT_SPProviderRealm { + RealmUrl = "https://intranet.contoso.com" + RealmUrn = "urn:sharepoint:contoso:intranet" + } + + SPTrustedIdentityTokenIssuerProviderRealms Farm1IncludeExcludeExample + { + IssuerName = "Contoso" + ProviderRealmsToInclude = $ProviderRealmsToInclude + ProviderRealmsToExclude = $ProviderRealmsToExclude + Ensure = "Present" + PsDscRunAsCredential = $SetupAccount + } + } +} + + diff --git a/Modules/SharePointDsc/en-US/about_SPUsageApplication.help.txt b/Modules/SharePointDsc/en-US/about_SPUsageApplication.help.txt index f072a5703..3a935104f 100644 --- a/Modules/SharePointDsc/en-US/about_SPUsageApplication.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPUsageApplication.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource provisions an instance of the usage and health monitoring service application. The database settings are only used for initial provisioning, but the usage settings can be changed and will be enforced as the resource is diff --git a/Modules/SharePointDsc/en-US/about_SPUserProfileProperty.help.txt b/Modules/SharePointDsc/en-US/about_SPUserProfileProperty.help.txt index 3487d22cf..b15ea0204 100644 --- a/Modules/SharePointDsc/en-US/about_SPUserProfileProperty.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPUserProfileProperty.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will create a property in a user profile service application. It creates, update or delete a property using the parameters that are passed in to it. diff --git a/Modules/SharePointDsc/en-US/about_SPUserProfileSection.help.txt b/Modules/SharePointDsc/en-US/about_SPUserProfileSection.help.txt index 062bde77c..f298036a2 100644 --- a/Modules/SharePointDsc/en-US/about_SPUserProfileSection.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPUserProfileSection.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will create a section in a user profile service application. It creates, update or delete a section using the parameters that are passed in to it. diff --git a/Modules/SharePointDsc/en-US/about_SPUserProfileServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPUserProfileServiceApp.help.txt index 9a6d3bab7..4751205ba 100644 --- a/Modules/SharePointDsc/en-US/about_SPUserProfileServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPUserProfileServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will provision an instance of the user profile service to the farm. It creates the required databases using the parameters that are passed in to it (although these are only used during the initial provisioning). @@ -43,6 +45,10 @@ Write - string The URL of the my site host collection +.PARAMETER MySiteManagedPath + Write - string + The Managed Path of the my site sites + .PARAMETER ProfileDBName Write - string The name of the profile database @@ -89,7 +95,7 @@ This example adds a new user profile service application to the local farm - Configuration Example + Configuration Example { param( [Parameter(Mandatory = $true)] @@ -104,6 +110,7 @@ Name = "User Profile Service Application" ApplicationPool = "SharePoint Service Applications" MySiteHostLocation = "http://my.sharepoint.contoso.local" + MySiteManagedPath = "personal" ProfileDBName = "SP_UserProfiles" ProfileDBServer = "SQL.contoso.local\SQLINSTANCE" SocialDBName = "SP_Social" @@ -121,7 +128,7 @@ This example adds a new user profile service application to the local farm - Configuration Example + Configuration Example { param( [Parameter(Mandatory = $true)] @@ -140,6 +147,7 @@ Name = "User Profile Service Application" ApplicationPool = "SharePoint Service Applications" MySiteHostLocation = "http://my.sharepoint.contoso.local" + MySiteManagedPath = "personal" ProfileDBName = "SP_UserProfiles" ProfileDBServer = "SQL.contoso.local\SQLINSTANCE" SocialDBName = "SP_Social" diff --git a/Modules/SharePointDsc/en-US/about_SPUserProfileServiceAppPermissions.help.txt b/Modules/SharePointDsc/en-US/about_SPUserProfileServiceAppPermissions.help.txt index d37c2e2f5..89470cea2 100644 --- a/Modules/SharePointDsc/en-US/about_SPUserProfileServiceAppPermissions.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPUserProfileServiceAppPermissions.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will apply permissions to a user profile service application. These can control access to create my sites, use social features, and use tagging. If you want to allow all users the ability to use a specific diff --git a/Modules/SharePointDsc/en-US/about_SPUserProfileSyncConnection.help.txt b/Modules/SharePointDsc/en-US/about_SPUserProfileSyncConnection.help.txt index 276369eda..b37f0f99a 100644 --- a/Modules/SharePointDsc/en-US/about_SPUserProfileSyncConnection.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPUserProfileSyncConnection.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will ensure a specifc user profile sync connection is in place and that it is configured accordingly to its definition @@ -36,10 +38,18 @@ Write - string The specific AD server to connect to +.PARAMETER Port + Write - uint32 + The specific port to connect to + .PARAMETER UseSSL Write - boolean Should SSL be used for the connection +.PARAMETER UseDisabledFilter + Write - boolean + Should disabled accounts be filtered + .PARAMETER Force Write - boolean Set to true to run the set method on every call to this resource diff --git a/Modules/SharePointDsc/en-US/about_SPUserProfileSyncService.help.txt b/Modules/SharePointDsc/en-US/about_SPUserProfileSyncService.help.txt index 045fa89ce..8975104ec 100644 --- a/Modules/SharePointDsc/en-US/about_SPUserProfileSyncService.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPUserProfileSyncService.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Specific + This resource is responsible for ensuring that the user profile sync service has been provisioned (Ensure = "Present") or is not running (Ensure = "Absent") on the current server. diff --git a/Modules/SharePointDsc/en-US/about_SPVisioServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPVisioServiceApp.help.txt index fe74ec48b..e5819b715 100644 --- a/Modules/SharePointDsc/en-US/about_SPVisioServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPVisioServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for creating Visio Graphics Service Application instances within the local SharePoint farm. The resource will provision and configure the Visio Graphics Service Application. diff --git a/Modules/SharePointDsc/en-US/about_SPWeb.help.txt b/Modules/SharePointDsc/en-US/about_SPWeb.help.txt index 6f48b73f4..fe4b41121 100644 --- a/Modules/SharePointDsc/en-US/about_SPWeb.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWeb.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will provision a SPWeb based on the settings that are passed through. These settings map to the New-SPWeb cmdlet and accept the same values diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppAuthentication.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppAuthentication.help.txt index 49fa25bb7..95c0c65f8 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppAuthentication.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppAuthentication.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for configuring the authentication on a web application within the local SharePoint farm. The resource is able to configure the five available zones (if they exist) separately and each diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppBlockedFileTypes.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppBlockedFileTypes.help.txt index bbc65b7eb..6c00a2e51 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppBlockedFileTypes.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppBlockedFileTypes.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for controlling the blocked file type setting on a specific web application. It has two modes of operation, the first is to use the "blocked" property, where you are able to define a specific list of file diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppGeneralSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppGeneralSettings.help.txt index 5daef7cce..e19a2bcb8 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppGeneralSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppGeneralSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for setting web application settings that are found under the "general settings" screen in central admin. The web application is specified through the URL property, and then any combination of diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppPeoplePickerSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppPeoplePickerSettings.help.txt index 9a26150ca..556fb2333 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppPeoplePickerSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppPeoplePickerSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to configure the People Picker settings for a web application. diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppPermissions.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppPermissions.help.txt index 376f4e1be..ec399bd14 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppPermissions.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppPermissions.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for managing the user permissions for a web application. You can either specify to set all permissions or specify individual permissions per category. diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppPolicy.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppPolicy.help.txt index 404dc14ba..0a6ce43e1 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppPolicy.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppPolicy.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to set the User Policies for web applications. The usernames can be either specified in Classic or Claims format, both will be accepted. There are a number of approaches to how this can be implemented. The diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppProxyGroup.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppProxyGroup.help.txt index 12151f76f..726b24e8f 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppProxyGroup.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppProxyGroup.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to associate a web application to a service application proxy group. Use the proxy group name "Default" to associate the web application to the default proxy group. A web applicaiton can only connect to diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppSiteUseAndDeletion.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppSiteUseAndDeletion.help.txt index 34dbcb74e..a8cbe3e18 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppSiteUseAndDeletion.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppSiteUseAndDeletion.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for controlling the Site Use and Deletion settings on a specific web application. You can enable or disable the Site Use and Deletion feature, specify the amount of days after which the alerts are diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppSuiteBar.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppSuiteBar.help.txt index 84140d108..6654bb948 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppSuiteBar.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppSuiteBar.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to set the Suite Bar branding for web applications. It supports both the SharePoint 2013 and SharePoint 2016 ways of branding the suite bar. diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppThrottlingSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppThrottlingSettings.help.txt index c82635b35..6b21ce165 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppThrottlingSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppThrottlingSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for setting web application settings that are found under the "resource throttling" screen in central admin. The web application is specified through the URL property, and then any combination of diff --git a/Modules/SharePointDsc/en-US/about_SPWebAppWorkflowSettings.help.txt b/Modules/SharePointDsc/en-US/about_SPWebAppWorkflowSettings.help.txt index b0a3353dc..fe71b8148 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebAppWorkflowSettings.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebAppWorkflowSettings.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for setting web application settings that are found under the "workflow settings" screen in central admin. The web application is specified through the URL property, and then any combination of diff --git a/Modules/SharePointDsc/en-US/about_SPWebApplication.help.txt b/Modules/SharePointDsc/en-US/about_SPWebApplication.help.txt index 497a8c23f..4962bccfd 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebApplication.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebApplication.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for creating a web application within the local SharePoint farm. The resource will provision the web application with all of the current settings, and then ensure that it stays part of the correct diff --git a/Modules/SharePointDsc/en-US/about_SPWebApplicationAppDomain.help.txt b/Modules/SharePointDsc/en-US/about_SPWebApplicationAppDomain.help.txt index 80c0a694b..351b54ed1 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebApplicationAppDomain.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebApplicationAppDomain.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource will configure the App Domain at a specific zone for the given Web Application. The configuration is done per zone on the specified web application, allowing for the setting of unique app domains for each extension diff --git a/Modules/SharePointDsc/en-US/about_SPWebApplicationExtension.help.txt b/Modules/SharePointDsc/en-US/about_SPWebApplicationExtension.help.txt index d0da31624..3911fc15d 100644 --- a/Modules/SharePointDsc/en-US/about_SPWebApplicationExtension.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWebApplicationExtension.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is responsible for extending an existing web application into a new zone. The resource will provision the web application extension with all of the current settings, and then ensure that it stays present and will ensure the diff --git a/Modules/SharePointDsc/en-US/about_SPWordAutomationServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPWordAutomationServiceApp.help.txt index 665b56e53..e902221ee 100644 --- a/Modules/SharePointDsc/en-US/about_SPWordAutomationServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWordAutomationServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + The resource is able to provision, unprovision and configure the Word Automation Service Application. All settings that you can configure on the Service Application administration page are configurable using this resource. diff --git a/Modules/SharePointDsc/en-US/about_SPWorkManagementServiceApp.help.txt b/Modules/SharePointDsc/en-US/about_SPWorkManagementServiceApp.help.txt index af5397081..ec7b9d855 100644 --- a/Modules/SharePointDsc/en-US/about_SPWorkManagementServiceApp.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWorkManagementServiceApp.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to provision and manage an instance of the Work Management Services Service Application. It will identify an instance of the work management service application through the application display name. diff --git a/Modules/SharePointDsc/en-US/about_SPWorkflowService.help.txt b/Modules/SharePointDsc/en-US/about_SPWorkflowService.help.txt index 56c9ff360..1b64effe7 100644 --- a/Modules/SharePointDsc/en-US/about_SPWorkflowService.help.txt +++ b/Modules/SharePointDsc/en-US/about_SPWorkflowService.help.txt @@ -3,6 +3,8 @@ # Description + **Type:** Distributed + This resource is used to register the SharePoint Server against a Workflow Manager Instance.