diff --git a/CHANGELOG.md b/CHANGELOG.md index f17d56bff..b48cc121b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,34 @@ # Change log for SharePointDsc +## 2.3 + +* 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 + * Fixed issue where the Set method for timerjobs deployed to multiple web + applications failed. +* SPTrustedIdentityTokenIssuerProviderRealms + * 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 + * Fixed issue where the connection was recreated when the name contained a + dot (SP2016) + ## 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. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md index 0cd04e512..a870cdfa7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/readme.md @@ -1,5 +1,7 @@ # 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/DSCResources/MSFT_SPAlternateUrl/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md index 8cf6c182a..115f7e838 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/readme.md @@ -1,5 +1,7 @@ # 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 59ae0bd7c..2c590131d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/readme.md @@ -1,5 +1,7 @@ # 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 3b8152ccb..41df77d02 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppCatalog/readme.md @@ -1,5 +1,7 @@ # 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 f515d708b..6e2732eb1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppDomain/readme.md @@ -1,4 +1,6 @@ # 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 8ba228486..4e6f83faa 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 7ecb2bc38..79f6faa4f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/readme.md @@ -1,4 +1,6 @@ # 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 4c286a5ed..6fa6ee30a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 06be5b8f9..844406ba6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/Readme.md @@ -1,5 +1,7 @@ # 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 f7df10161..d538b5d08 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/Readme.md @@ -1,5 +1,7 @@ # 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 7672893ff..5c45d53cd 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPConfigWizard/readme.md @@ -1,5 +1,7 @@ # 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/DSCResources/MSFT_SPContentDatabase/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md index 89a9e6d34..ecd15c96e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPContentDatabase/Readme.md @@ -1,5 +1,7 @@ # 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 6415f1198..c66256bae 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/Readme.md @@ -1,5 +1,7 @@ # 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 b93ad99df..cdc08df96 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/Readme.md @@ -1,5 +1,7 @@ # 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 fb88312bc..51abc1eb9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/Readme.md @@ -1,5 +1,7 @@ # 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 6d14c7fa8..e20764f95 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/readme.md @@ -1,5 +1,7 @@ # 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 b74dc6aa3..28b1a3812 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/Readme.md @@ -1,5 +1,7 @@ # 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 0c0d1e577..4632417d4 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/Readme.md @@ -1,5 +1,7 @@ # 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 37f3cb872..bef4f2da8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/Readme.md @@ -1,5 +1,7 @@ # 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/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_SPFarm/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md index c12703319..6058dae3e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarm/Readme.md @@ -1,5 +1,7 @@ # 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/DSCResources/MSFT_SPFarmAdministrators/Readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md index 832f56241..eb2669550 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/Readme.md @@ -1,5 +1,7 @@ # 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 864d6dfd8..c715d8fe9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/readme.md @@ -1,5 +1,7 @@ # 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 b917185b0..65ffe33a7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFarmSolution/Readme.md @@ -1,5 +1,7 @@ # 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 4973dde53..716eef156 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPFeature/Readme.md @@ -1,5 +1,7 @@ # 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 3120a07d5..36742b1de 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/Readme.md @@ -1,4 +1,6 @@ # 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 da7265889..496785e62 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/readme.md @@ -1,5 +1,7 @@ # 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 5de1e89a0..6eadc058a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstall/Readme.md @@ -1,5 +1,7 @@ # 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 c9722b21b..fc28cb5a7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/Readme.md @@ -1,5 +1,7 @@ # 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 97f74d903..87e188ac3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/Readme.md @@ -1,5 +1,7 @@ # 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 c137c4e29..2e2ae6f2b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPIrmSettings/Readme.md @@ -1,5 +1,7 @@ # 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 bf2ff4ec5..c1a8d5c2d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPLogLevel/readme.md @@ -1,5 +1,7 @@ # 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 b52fba9f5..9aa39c06b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 9e5a42233..30b3d9cc2 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedAccount/readme.md @@ -1,5 +1,7 @@ # 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 fdaaf888d..1283f8583 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 204efa0be..15de4750b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/readme.md @@ -1,5 +1,7 @@ # 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 6746d5522..fa8c37b6d 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPManagedPath/readme.md @@ -1,5 +1,7 @@ # 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 56cdc0ebb..7eac25dd8 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/readme.md @@ -1,5 +1,7 @@ # 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 94cbae815..8509e0cdf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/readme.md @@ -1,5 +1,7 @@ # 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 2808f3f42..31a3f1ccc 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/readme.md @@ -1,5 +1,7 @@ # 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 be17fe588..2aa70c084 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/readme.md @@ -1,5 +1,7 @@ # 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 723aa7bf7..c82e7773c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 63eb93240..24c133a51 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProductUpdate/readme.md @@ -1,5 +1,7 @@ # 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 ba49d0e34..a79782aa6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/readme.md @@ -1,5 +1,7 @@ # 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 b8fe2a3c9..1e9e84a24 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/readme.md @@ -1,4 +1,6 @@ # 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 d1008e7eb..e1ca0a8ac 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/readme.md @@ -1,4 +1,6 @@ # 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 4c76eec94..37c077dfa 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/readme.md @@ -1,5 +1,7 @@ # 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 148519caf..b413b9494 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/readme.md @@ -1,4 +1,6 @@ # 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 b77cc3517..c9939c57b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/readme.md @@ -1,4 +1,6 @@ # 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 723dda8da..5b1784eb0 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 7b0a793fd..ca26f8c18 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/readme.md @@ -1,4 +1,6 @@ # 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 122be11c1..15a73bb6a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/readme.md @@ -1,4 +1,6 @@ # 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 a922c8dbd..f04d6749e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/readme.md @@ -1,5 +1,7 @@ # 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 a2b7e7508..462dbfc17 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/readme.md @@ -1,5 +1,7 @@ # 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 890978ff7..99e56b6fa 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/readme.md @@ -1,5 +1,7 @@ # 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 74bc5ce13..a05c09641 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/readme.md @@ -1,5 +1,7 @@ # 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 46ca782cf..dd6fa7e35 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/readme.md @@ -1,5 +1,7 @@ # 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 2f6f4060a..30d452cf3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/readme.md @@ -1,5 +1,7 @@ # 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 0f6770f34..7e7dab770 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/readme.md @@ -1,5 +1,7 @@ # 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 b38cd59d5..18f97cfd3 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/readme.md @@ -1,5 +1,7 @@ # 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 e193c9f7c..4e971d332 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/readme.md @@ -1,5 +1,7 @@ # 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 ac43ccdcd..53de58caf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchFileType/readme.md @@ -1,5 +1,7 @@ # 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 4576ce855..7d3c738e6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/readme.md @@ -1,5 +1,7 @@ # 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 bca3e5e59..fbff9dd27 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/readme.md @@ -1,5 +1,7 @@ # 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 759122c71..866e5e932 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 7aa81003b..b66cb5d14 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSearchTopology/readme.md @@ -1,5 +1,7 @@ # 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 94c781e4d..038b7c1cf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 abe450295..b99197f1f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/readme.md @@ -1,5 +1,7 @@ # 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 22d2455ad..42338bbb5 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/readme.md @@ -1,5 +1,7 @@ # 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 715de216a..7e9cffd79 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/readme.md @@ -1,5 +1,7 @@ # 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 75933138f..d87606891 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/readme.md @@ -1,5 +1,7 @@ # 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 a33e7ae09..8774fef49 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/readme.md @@ -1,5 +1,7 @@ # 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 c98ba5a9d..9c3c5935e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPServiceInstance/readme.md @@ -1,5 +1,7 @@ # 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 7c26ec9ca..c09baefb5 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSessionStateService/readme.md @@ -1,5 +1,7 @@ # 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 3bcf3a9af..979611faf 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPShellAdmins/readme.md @@ -1,5 +1,7 @@ # 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 d20e07062..d6275a939 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSite/readme.md @@ -1,5 +1,7 @@ # 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 6ccf3b3a8..85ebe3788 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 c8ef54115..6b3e95660 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/readme.md @@ -1,5 +1,7 @@ # 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/MSFT_SPTimerJobState.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 index 53d3b4a43..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) { @@ -160,7 +160,7 @@ function Set-TargetResource } $timerjob = Get-SPTimerJob -Type $params.TypeName ` - -WebApplication $webapp + -WebApplication $wa if ($timerjob.Count -eq 0) { diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md index f2b6c5b19..cd772c126 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTimerJobState/readme.md @@ -1,5 +1,7 @@ # 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 9fa77e9b4..21b24c97f 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/readme.md @@ -1,5 +1,7 @@ # Description +**Type:** Distributed + This resource is used to create or remove SPTrustedIdentityTokenIssuer in a SharePoint farm. 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..000656adc --- /dev/null +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -0,0 +1,370 @@ +function Get-TargetResource +{ + [CmdletBinding()] + [OutputType([System.Collections.Hashtable])] + param + ( + [Parameter(Mandatory = $true)] + [string]$IssuerName, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + + [Parameter()] + [ValidateSet("Present", "Absent")] + [String] + $Ensure = "Present", + + [Parameter()] + [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") + } + + $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] + $currentRealms = @{ } + + $spTrust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` + -ErrorAction SilentlyContinue + + if ($spTrust -eq $null) + { + throw ("SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found") + } + + if ($spTrust.ProviderRealms.Count -gt 0) + { + $spTrust.ProviderRealms.Keys | ForEach-Object { + $currentRealms.Add("$($_.ToString())", "$($spTrust.ProviderRealms[$_])") + } + } + return $currentRealms + } + + $currentStatus = Get-ProviderRealmsStatus -currentRealms $result -desiredRealms $paramRealms ` + -includeRealms $includeRealms -excludeRealms $excludeRealms ` + -Ensure $Ensure + + return @{ + IssuerName = $IssuerName + ProviderRealms = $paramRealms + ProviderRealmsToInclude = $includeRealms + ProviderRealmsToExclude = $excludeRealms + CurrentRealms = $result + RealmsToAdd = $currentStatus.NewRealms + Ensure = $currentStatus.CurrentStatus + } +} + +function Set-TargetResource +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory = $true)] + [string] + $IssuerName, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + + [Parameter()] + [ValidateSet("Present", "Absent")] + [String] + $Ensure = "Present", + + [Parameter()] + [System.Management.Automation.PSCredential] + $InstallAccount + ) + + $CurrentValues = Get-TargetResource @PSBoundParameters + + 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] + + $trust = Get-SPTrustedIdentityTokenIssuer -Identity $params.IssuerName ` + -ErrorAction SilentlyContinue + + if ($trust -eq $null) + { + throw ("SPTrustedIdentityTokenIssuer '$($params.IssuerName)' not found") + } + + $trust.ProviderRealms.Clear() + $params.RealmsToAdd.Keys | ForEach-Object { + Write-Verbose "Setting Realm: $([System.Uri]$_)=$($params.RealmsToAdd[$_])" + $trust.ProviderRealms.Add([System.Uri]$_, $params.RealmsToAdd[$_]) + } + $trust.Update() + } + } +} + +function Test-TargetResource +{ + [CmdletBinding()] + [OutputType([Boolean])] + param + ( + [Parameter(Mandatory = $true)] + [string] + $IssuerName, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealms, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToInclude, + + [Parameter()] + [Microsoft.Management.Infrastructure.CimInstance[]] + $ProviderRealmsToExclude, + + [Parameter()] + [ValidateSet("Present", "Absent")] + [String] + $Ensure = "Present", + + [Parameter()] + [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 + +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") + } + + if ($desiredRealms.Count -eq 0) + { + throw ("Parameter ProviderRealms is empty or Null") + } + + $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 new file mode 100644 index 000000000..376d3756b --- /dev/null +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.schema.mof @@ -0,0 +1,16 @@ +[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; + [Write, EmbeddedInstance("MSFT_SPProviderRealm"), Description("Realms to set. Those not in this list will be removed")] String ProviderRealms[]; + [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 new file mode 100644 index 000000000..fc4a2139b --- /dev/null +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/readme.md @@ -0,0 +1,14 @@ +# 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. diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md index d1f9dd3ef..4a517ac12 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUsageApplication/readme.md @@ -1,5 +1,7 @@ # 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 547c901fd..12a3056c6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/readme.md @@ -1,5 +1,7 @@ # 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 83a9c2468..b6dfc87ae 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/readme.md @@ -1,5 +1,7 @@ # 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/MSFT_SPUserProfileServiceApp.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index fd435b029..6d9bce52c 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, @@ -91,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. Please note that this will cause issues when applying the configuration.") } } } @@ -160,11 +163,26 @@ function Get-TargetResource $proxyName = $serviceAppProxy.Name } } + $upMySiteLocation = $null + $upMySiteManagedPath = $null + try { + $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 + $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 +220,10 @@ function Set-TargetResource [System.String] $MySiteHostLocation, + [Parameter()] + [System.String] + $MySiteManagedPath, + [Parameter()] [System.String] $ProfileDBName, @@ -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/DSCResources/MSFT_SPUserProfileServiceApp/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md index 1e977f93f..86ba9f9c9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 243af4387..d37ca6885 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/readme.md @@ -1,5 +1,7 @@ # 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/MSFT_SPUserProfileSyncConnection.psm1 b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index f9d6b0ee9..fc56cbf55 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] @@ -60,9 +68,25 @@ 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 + Ensure = "Absent" + } + if ($null -eq $ups) { - return $null + return $nullreturn } else { @@ -70,58 +94,117 @@ 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 $params.Name + $_.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 -and $null -eq $connection) + { + $Name = $params.Forest -replace "\.", "-" + $connection = $upcm.ConnectionManager | Where-Object -FilterScript { + $_.DisplayName -eq $Name + } + } + if ($null -eq $connection) { - return $null + return $nullreturn } $namingContext = $connection.NamingContexts | Select-Object -First 1 if ($null -eq $namingContext) { $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 $nullreturn + } + + 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 + Ensure = "Present" } } + $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 + Name = $params.Name + ConnectionCredentials = $accountCredentials + IncludedOUs = $inclOUs + ExcludedOUs = $exclOUs + Server = $domainController UseSSL = $connection.UseSSL + UseDisabledFilter = $connection.UseDisabledFilter + Port = $params.Port ConnectionType = $connection.Type.ToString() Force = $params.Force + Ensure = "Present" } } } @@ -161,6 +244,10 @@ function Set-TargetResource [System.String] $Server, + [Parameter()] + [System.UInt32] + $Port = 389, + [Parameter()] [System.Boolean] $Force, @@ -169,6 +256,10 @@ function Set-TargetResource [System.Boolean] $UseSSL, + [Parameter()] + [System.Boolean] + $UseDisabledFilter, + [Parameter()] [ValidateSet("ActiveDirectory","BusinessDataCatalog")] [System.String] @@ -181,6 +272,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 + } + } + + 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) + { + Write-Verbose -Message "NOTE: The UseDisabledFilter parameter is ignored in SharePoint 2013." + } + } + Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments @($PSBoundParameters, $PSScriptRoot) ` -ScriptBlock { @@ -211,8 +343,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) @@ -245,7 +388,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) @@ -310,7 +453,8 @@ function Set-TargetResource switch($installedVersion.FileMajorPart) { - 15{ + 15 + { $upcm.ConnectionManager.AddActiveDirectoryConnection( [Microsoft.Office.Server.UserProfiles.ConnectionType]::ActiveDirectory, ` $params.Name, ` $params.Forest, ` @@ -326,15 +470,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 +530,10 @@ function Test-TargetResource [System.String] $Server, + [Parameter()] + [System.UInt32] + $Port = 389, + [Parameter()] [System.Boolean] $Force, @@ -384,6 +542,10 @@ function Test-TargetResource [System.Boolean] $UseSSL, + [Parameter()] + [System.Boolean] + $UseDisabledFilter, + [Parameter()] [ValidateSet("ActiveDirectory","BusinessDataCatalog")] [System.String] @@ -398,7 +560,7 @@ function Test-TargetResource $CurrentValues = Get-TargetResource @PSBoundParameters - if ($null -eq $CurrentValues) + if ($null -eq $CurrentValues.UserProfileService) { return $false } @@ -410,8 +572,7 @@ function Test-TargetResource return Test-SPDscParameterState -CurrentValues $CurrentValues ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck @("Name", - "Forest", + -ValuesToCheck @("Forest", "UserProfileService", "Server", "UseSSL", 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; diff --git a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md index 233182f52..0a421a684 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/readme.md @@ -1,5 +1,7 @@ # 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 ad89863c8..4c4d74a5c 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/readme.md @@ -1,5 +1,7 @@ # 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 359642836..cfdf41eb4 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 dc8e08ffa..267226221 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWeb/readme.md @@ -1,5 +1,7 @@ # 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 cf2745036..a197bba25 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/readme.md @@ -1,5 +1,7 @@ # 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 0b7084e7c..cef31b3c5 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/readme.md @@ -1,5 +1,7 @@ # 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 b6ed846ab..1aad9058a 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/readme.md @@ -1,5 +1,7 @@ # 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 a28dd8a4d..589f28b5e 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/readme.md @@ -1,5 +1,7 @@ # 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 87934d96f..077e5dfb6 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/readme.md @@ -1,5 +1,7 @@ # 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 dae304c81..ae5142289 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/readme.md @@ -1,5 +1,7 @@ # 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 5fca8e199..96c6b83f0 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/readme.md @@ -1,5 +1,7 @@ # 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 11d074faa..256312c93 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/readme.md @@ -1,5 +1,7 @@ # 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 c40e694d6..8d926aa3b 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/readme.md @@ -1,5 +1,7 @@ # 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 fed7e5cbf..37fdec3b7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/readme.md @@ -1,5 +1,7 @@ # 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 b2f8a0681..00b2533d7 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/readme.md @@ -1,5 +1,7 @@ # 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 eb0ffd693..32f794a08 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplication/readme.md @@ -1,5 +1,7 @@ # 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 ff9d77878..89f9625af 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/readme.md @@ -1,5 +1,7 @@ # 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 f3ecb1f7c..eba0b6a38 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/readme.md @@ -1,5 +1,7 @@ # 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 0777929b3..485c4daf1 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 3cbd643c9..47946fd97 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/readme.md @@ -1,5 +1,7 @@ # 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 6ffc263e7..1a16a7bb9 100644 --- a/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md +++ b/Modules/SharePointDsc/DSCResources/MSFT_SPWorkflowService/readme.md @@ -1,5 +1,7 @@ # Description +**Type:** Distributed + This resource is used to register the SharePoint Server against a Workflow Manager Instance. 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..193831f4d --- /dev/null +++ b/Modules/SharePointDsc/Examples/Resources/SPTrustedIdentityTokenIssuerProviderRealms/1-Example.ps1 @@ -0,0 +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 + + 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 + } + } +} 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..7c8a3db78 --- /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_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 + } + } +} 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..f60ed5d17 --- /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_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 + } + } +} 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..debd71402 --- /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_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/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" diff --git a/Modules/SharePointDsc/SharePointDsc.psd1 b/Modules/SharePointDsc/SharePointDsc.psd1 index 703274b61..538b705de 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 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. 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 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.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 new file mode 100644 index 000000000..e32dbc601 --- /dev/null +++ b/Tests/Unit/SharePointDsc/SharePointDsc.SPTrustedIdentityTokenIssuerProviderRealms.Tests.ps1 @@ -0,0 +1,693 @@ +[CmdletBinding()] +param ( + [Parameter()] + [string]$SharePointCmdletModule = (Join-Path -Path $PSScriptRoot ` + -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 SPTrustedLoginProvider 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 + } + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + 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 | 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:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1 ` + -and $Global:SPTrustedIdentityTokenIssuerAddProviderRealmCalledCount -eq 2) | 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" + 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 + } + + $realmsDict.Remove("https://intranet.contoso.com/") + + $realmRet = [pscustomobject]@{ + ProviderRealms = $realmsDict + } + + $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: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: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 | 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: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: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 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 updated in 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 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: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 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 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: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 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 3 ` + -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: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 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: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: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 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 2 ` + -and $Global:SPTrustedIdentityTokenIssuerUpdateCalledCount -eq 1) | Should Be $true + } + } + } +} + +Invoke-Command -ScriptBlock $Global:SPDscHelper.CleanupScript -NoNewScope diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileServiceApp.Tests.ps1 index 31c9fafdd..bf8721290 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,8 +61,21 @@ 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 { + Context -Name "When PSDSCRunAsCredential matches the Farm Account and Service App is null" -Fixture { $testParams = @{ Name = "User Profile Service App" ApplicationPool = "SharePoint Service Applications" @@ -63,11 +93,119 @@ 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 " + (Get-TargetResource @testParams).Ensure | Should Be "Absent" } It "Should throw exception in the Test method" { - { Test-TargetResource @testParams } | Should throw "Specified PSDSCRunAsCredential " + 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 Be $true } It "Should throw exception in the set method" { diff --git a/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 b/Tests/Unit/SharePointDsc/SharePointDsc.SPUserProfileSyncConnection.Tests.ps1 index a205af4ef..388cf585e 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 ` @@ -191,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" @@ -214,7 +263,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 +297,46 @@ 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 } + } + + 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 "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 } } @@ -272,13 +360,12 @@ 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" } $litWareconnection = @{ - DisplayName = "Contoso" + DisplayName = $name Server = "litware.net" NamingContexts= New-Object -TypeName System.Collections.ArrayList AccountDomain = "Contoso" @@ -327,7 +414,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 } } @@ -360,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 { @@ -437,7 +529,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 +549,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,24 +568,24 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } } - Context -Name "When naming context is null (ADImport for SP2016)" -Fixture { + Context -Name "Connection exists and name contains dots" -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" } $litWareconnection = @{ - DisplayName = "Contoso" + DisplayName = "contoso.com" Server = "litware.net" NamingContexts= New-Object -TypeName System.Collections.ArrayList AccountDomain = "Contoso" AccountUsername = "TestAccount" + UseDisabledFilter = $false Type= "ActiveDirectory" } @@ -503,22 +596,35 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { 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) - $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 ` - ) + param([Microsoft.Office.Server.UserProfiles.ConnectionType] $connectionType, ` + $name, ` + $forest, ` + $useSSL, ` + $userName, ` + $securePassword, ` + $namingContext, ` + $p1, $p2 ` + ) $Global:SPDscUPSAddActiveDirectoryConnectionCalled =$true } -PassThru @@ -531,10 +637,252 @@ Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture { } -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 } + } + } - It "Should return values from the get method" { - Get-TargetResource @testParams | Should Not BeNullOrEmpty + 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" + } + + $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 + } + } + + 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" + } } } } diff --git a/appveyor.yml b/appveyor.yml index 49d59a557..1dd397448 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,4 @@ -version: 2.2.0.{build} -image: WMF 5 +version: 2.3.0.{build} install: - git clone https://github.com/PowerShell/DscResource.Tests