GithubHelp home page GithubHelp logo

dsccommunity / sharepointdsc Goto Github PK

View Code? Open in Web Editor NEW
240.0 59.0 108.0 18.56 MB

The SharePointDsc PowerShell module provides DSC resources that can be used to deploy and manage a SharePoint farm

License: MIT License

PowerShell 45.58% C# 54.42%
powershell dsc-resources sharepoint dsc microsoft desired-state-configuration desiredstateconfiguration configuration-as-code devops

sharepointdsc's Introduction

SharePointDsc

Build Status Azure DevOps coverage (branch) Azure DevOps tests PowerShell Gallery (with prereleases) PowerShell Gallery

The SharePointDsc PowerShell module (formerly known as xSharePoint) provides DSC resources that can be used to deploy and manage a SharePoint farm.

Please leave comments, feature requests, and bug reports in the issues tab for this module.

Information about this module, new releases and tips/tricks will be shared on the SharePointDsc blog.

Code of Conduct

This project has adopted this Code of Conduct.

Releases

For each merge to the branch master a preview release will be deployed to PowerShell Gallery. Periodically a release version tag will be pushed which will deploy a full release to PowerShell Gallery.

Contributing

If you would like to modify SharePointDsc module, please feel free. Please refer to the Contribution Guidelines for information about style guides, testing and patterns for contributing to DSC resources.

Also check out common DSC Community contributing guidelines.

Installation

To manually install the module, download the source code and unzip the contents of the \Modules\SharePointDsc directory to the $env:ProgramFiles\WindowsPowerShell\Modules folder

To install from the PowerShell gallery using PowerShellGet (in PowerShell 5.0) run the following command:

Find-Module -Name SharePointDsc -Repository PSGallery | Install-Module

To confirm installation, run the below command and ensure you see the SharePoint DSC resoures available:

Get-DscResource -Module SharePointDsc

Requirements

The minimum PowerShell version required is 5.0, available for all currently supported operating systems. The preferred version is PowerShell 5.1, which ships with Windows 10 or Windows Server 2016. This is discussed on the SharePointDsc wiki.

Documentation and examples

For a full list of resources in SharePointDsc and examples on their use, check out the SharePointDsc wiki. You can also review the "examples" directory in the SharePointDSC module for some general use scenarios for all of the resources that are in the module.

Changelog

A full list of changes in each version can be found in the change log

sharepointdsc's People

Contributors

adruet29 avatar andikrueger avatar brianfarnhill avatar brianlala avatar caadam avatar camiloborges avatar cloudchristoph avatar damianwiese avatar dscbot avatar hiltongiesenow avatar hollanjs avatar jensotto avatar johlju avatar karolkaczmarek avatar kwirkykat avatar lazda avatar llowevad avatar luigilink avatar mikelacher448 avatar mrpullen avatar nikcharlebois avatar petepuu avatar ronx avatar ruandersmsft avatar sguilbault-sherweb avatar thomaslie avatar timhaintz avatar wulfland avatar ykuijs avatar yvand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sharepointdsc's Issues

Prerequisite Installer Does Not Validate File Paths

If you set the Prere installer to use Offline mode, and supply it with paths to the prereqs, it doesn't validate that they are actually available at the path supplied, and the installer gets stuck in an endless reboot loop.

Add xSPWebAppExtension resource

The xSPWebAppExtension resource is used to create an extension of a SharePoint web application. It should be structured as follows:

xSPWebAppExtension PublicSiteExtension
{
WebAppUrl = "https://www.sharepoint.contoso.com"
ApplicationPool = "SharePoint Sites"
ApplicationPoolAccount = "CONTOSO\svcSPWebAppPool"
AllowAnonymous = $false
AuthenticationMethod = "NTLM"
HostHeader = "sharepoint.contoso.com"
Port = 443
SSL = $true
Zone = "Internet"
}

Extend xSPWebApplication resource to include "resource throttling"

Extend the cSPWebAppliation resource top include the follow settings (seen in central admin under the "resource throttling" dialog)

  • List view threshold
  • Allow object model override
  • Admin threshold
  • List view lookup threshold
  • Daily time window for large queries
  • Unique permission threshold
  • HTTP request throttling
  • Change log details

Add xSPWordAutomationServiceApp resource

The xSPWordAutomationServiceApp resource is used to provision an instance of the word automation services service app. It should be structured as follows:

xSPWordAutomationServiceApp WordAutomationService
{
Name = "Word Automation Services Service App"
Ensure = "Present"
AppPool = "SharePoint Web Services"
}

Add xSPAntivirusSettings resource

The xSPAntivirusSettings resource will be used to configure the anti virus farm settings. It will be represented as below:

xSPAntivirusSettings ConfigureAV
{
ScanDocumentsOnUpload=$false
ScanDocumentsOnDownload=$false
AllowUsersToDownloadInfectedDocuments=$true
AttemptToCleanInfectedDocuments=$false
TimeoutDuration=300
NumberOfThreads=5
}

Add xSPSearchCrawlerImpactRule resource

The xSPSearchCrawlerImpactRule resource will add a crawler impact rule to the specified service application.

xSPSearchCrawlerImpactRule ThrottleIntranetCrawl
{
ServiceAppName = "Enterprise Search Service Application"
Site = "https://intranet.sharepoint.contoso.com"
RequestLimit = "8"
}

This rule also needs to accommodate the wait time between requests option for an impact rule as well (which can't be used at the same time as the request limit option)

Add xSPSearchContentSource resource

The xSPSearchContentSource resource is used to define a content source for a specific enterprise search application. It should be structured as follows:

xSPSearchContentSource LocalIntranet
{
Name = "Local Intranet"
Ensure = "Present"
ServiceAppName = "Enterprise Search Service Application"
StartAddresses = "https://intranet.sharepoint.contoso.com"
CrawlEverythingAtAddress = $true
ContinuousCrawl = $true
Priority = "Normal"
}

Additional properties will need to be added here to facilitate setting the schedule for full and incremental crawls where continuous crawl is not used.

Extend xSPWebApplication resource to include "general settings"

Extend the xSPWebAppliation resource top include the follow settings (seen in central admin under the "general settings" dialog)

  • TimeZone
  • Default Quota Template
  • Alerts (on/off and limit)
  • RSS
  • Blog API
  • Browser File Handling
  • Security Validation
  • Recycle bin settings
  • Maximum upload size
  • Customer experience program
  • Usage cookie

Extracting functions to enable unit testing

Currently we are unable to perform automated unit testing of the xSharePoint modules as the machine that will run the tests needs to have the SharePoint binaries installed on it (so the Microsoft.SharePoint.PowerShell snapin is available locally). Since we can't install the binaries on each machine that will run the tests (such as the AppVeyor CI servers for example) we can't write tests using Pester to validate our get or set methods specifically.

An approach has been suggested where the SharePoint cmdlets could essentially be wrapped in a method that exists within xSharePoint, so that we can mock against the xSharePoint local methods to write the tests and still have the actual SharePoint cmdlets execute when it's pushed to a real environment. So for example in xSPServiceAppPool we have this line in the setter:

New-SPServiceApplicationPool -Name $params.Name -Account $params.ServiceAccount

This would be replaced with something like this:

New-xSharePointServiceApplicationPool -Name $params.Name -Account $params.ServiceAccount

and elsewhere in the module we would define New-xSharePointServiceApplicationPool as a function and use the @PSBoundParameters object to simply pass the call through to New-SPServiceApplicationPool.

This would mean that there would be many of these 'stub' methods throughout the module, increasing its overall size and making it a little less clear where things were called from. However we would gain much greater code coverage throughout the module, meaning that automated tests could pick up issues in logic sooner.

I would appreciate thoughts on the topic either in favour or against the use of these stub methods so we can have better tests.

Add xSPPasswordChangeSettings resource

The xSPPasswordChangeSettingsresource will be used to configure the farm wide Pasword Change settings. It will be represented as below:

xSPPasswordChangeSettings ConfigurePasswordChange
{
MailAddress=”[email protected]
DaysBeforeExpiry=10
PasswordChangeWaitTimeSeconds=45
NumberOfRetries=5
}

Add xSPFarmAdministrators resource

The xSPFarmAdministrators resource will be used to manage the members of the Farm Administrators group. It will be represented as below:

xSPFarmAdministrators FarmAdmins
{
Members=”DOMAIN\UserX”, "BUILTIN\Administrators", "DOMAIN\sp_farm"
MembersToInclude=""DOMAIN\User1"
MembersToExclude="DOMAIN\User2"
}

The Members property is used to enforce a specific list of users which have to be a member of the Farm Administrators group and cannot be used together with the MembersToInclude and/or MembersToExclude properties.
The MembersToInclude and MembersToExclude properties are used to make sure one (or a set of) user is added to Farm Admins (MembersToInclude) or a user can never be a member of the Farm Admins (MembersToExclude).

Nested Modules isn't loading (for some reason

Attempting to run xManagedPath Resource, receiving the error

The term 'Get-xSharePointAuthenticatedPSSession' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
+ CategoryInfo : ObjectNotFound: (Get-xSharePointAuthenticatedPSSession:) [], CimException
+ FullyQualifiedErrorId : CommandNotFoundException
+ PSComputerName : localhost

xSPDiagnosticLoggingSettings sets DaysToKeepLogs to 1

In v 0.2.0.76 the xSPDiagnosticLoggingSettings resource treats the DaysToKeepLogs property as a boolean, meaning the number will always return as 1 (when it converts the number to a boolean and back this is the result). This means if you include the property the value will always be set to 1, and will then subsequently fail the next time it gets tested (unless you set the value to 1 on purpose), creating an infinite loop of setting the value back to 1 on each DSC test.

The fix is simple and has been identified to be included in the next release. In the mean time the recommendation is to not use the DaysToKeepLogs property, instead manually setting this value as a workaround for the time being.

PowerShell prerequisite

Hi guys,

What about making the /PowerShell param optional for the offline prerequisites installer. Most installations nowadays will be done on Windows Server 2012 or R2, so it seems overkill to have it mandatory.

Add xSPSearchAuthoratativePages resource

The xSPSearchAuthoratativePages resource is used to define the authoritative sites in the search service app. It should be structured as per the below example:

xSPSearchAuthoratativePages SetAuthoratativePages
{
ServiceAppName = "Enterprise Search Service Application"
FirstLevel = "https://intranet.sharepoint.contoso.coim"
SecondLevel = ""
ThirdLevel = ""
DemoteSites = ""
}

Add xSPTimerJobState resource

The xSPTimerJobState resource will be used to configure a timer job and make sure it is in a specific state. It will be represented as below:

xSPTimerJobState DisableTimerJob
{
Name = "Dead Site Delete"
WebApplication = "SharePoint - www.domain.com80"
Enabled = $true
Schedule="weekly at sat 5:00"
}

Add xSPMachineTranslationServiceApp resource

The xSPMachineTranslationServiceApp resource is used to provision the machine translation service app. It should be structured as follows:

xSPMachineTranslationServiceApp MachineTranslation
{
Name = "Machine Translation Service Application"
Ensure = "Present"
DatabaseName = "SP_MachineTranslation"
DatabaseServer = "SQL01.contoso.com"
AppPool = "SharePoint Web Services"
PartitionedMode = $true
}

Add xSPWebAppBlockedFileTypes resource

We are looking to add a resource to manage the blocked file types that are used on a web application. The syntax would look like this:

xSPWebAppBlockedFileTypes BlockFileTypes
{
    WebAppName = "SharePoint sites"
    BlockedFileTypes = "exe,dll"
    AllowedFileTypes = "config,json"
}

The concept here is that an administrator can specify a list of file types to ensure are in the blocked file types list for the given web application, but also to specify file types that are to never be in the list (so in the case of them being manually added they can be removed).

Add xSPSearchManagedProperty resource

The xSPSearchManagedProperty resource is used to define managed properties in the search service application. This should be structured as per the below:

xSPSearchManagedProperty MyCustomSearchProperty
{
ServiceAppName = "Enterprise Search Service Application"
Ensure = "Present"
Name = "MyProperty"
PropertyType = "Text"
Searchable = $true
Queryable = $true
Retrievable = $true
AllowMultipleValues = $true
Refinable = "Yes-Latent"
Sortable = "Yes-Active"
SafeForAnonymous = $false
Alias = "PropertyAlias"
TokenNormalisation = $true
CompleteMatching = $false
IncludeAllCrawledProperties = $false
CrawledProperties = "Field1,Field2"
}

Add xSPUserProfileSyncConnection resource

The xSPUserProfileSyncConnection resource defines a specific connection that should be defined in the user profile service application specified on the farm. This maps to the Add-SPProfileSyncConnection cmdlet and should surface all of its options. It should be structured as follows:

xSPUserProfileSyncConnection MainDomain
{
UserProfileService = "User Profile Service Application"
ConnectionForest = "contoso.com"
ConnectionDomain = "Contoso"
ConnectionCredentials = $connectionCredential
ConnectionOU = "OU=SharePoint Users,DC=Contoso,DC=com"
}

Add xSPSecureStoreApplication resource

The xSPSecureStoreApplication resource is used to create entries in the secure store service application. It should be structured as follows:

xSPSecureStoreApplication MySecureAccount
{
SecureStoreServiceApp = "Secure Store Service Application"
Ensure = "Present"
Name = "MySecureCredential"
DisplayName = "My secure credential"
ContactEmail = "[email protected]"
TartgetAppType = "Individual"
UrlType = "Default"
CredentialOwner = "CONTOSO\someone"
CredentialToStore = $CredentialToStore
}

Endless Reboot Loop using Windows Server Technical Preview 2

I know Win Server 2016 is not supporting SP 2013 just yet, however, trying to troubleshoot my other issue with the DSC resource (#51), I wanted to make sure I tested with WMF 5 and decided to use Server 2016. My current configuration is that I have a DSC pull server running on Windows Server Technical Preview 2, as well as my server node, running the same version of the server OS. Using a DSc config script that worked when my node was Server 2012 R2, now causes an infinite reboot loop when trying to install the prerequisites. I am trying to look at the event viewer to see the root cause of the issue, but it reboots too quick for me to even take a look at it. I will continue to investigate and post my updates using this issue entry.

Add xSPDesignerSettings resource

The xSPDesignerSettings resource will configure SharePoint Designer Settings for the farm or a specific site collection. It should be structured as follows:

xSPDesignerSettings MainWebAppSPDSettings
{
Url = "https://intranet.sharepoint.contoso.com"
Scope = "WebApplication"
EnableSPD = $false
AllowDetachPages = $false
EnableMasterPageCustomise = $false
EnableHiddenFolderStructure = $false
}

The scope here should be "WebApplication" or "SiteCollection" and it can then apply the settings to the relevant target.

Get-DSCConfiguration or Test-DSCConfiguration fail due to Get-TargetResource Hashtable return values.

so setting a managed path using the xSharePoint module. When I run Test-DSCConfiguration or Get-DSCConfiguration the command fails ... error output below

C:\windows\system32\WindowsPowerShell\v1.0\Modules\xSharePoint\DscResources\MSFT_xSPManagedPath returned results that
are not valid from Get-TargetResource. The PathType key is not a valid property in the corresponding provider schema
file. The results from Get-TargetResource must be in a Hashtable format. The keys in the Hashtable must be the same as
the properties in the corresponding provider schema file.
At line:1 char:1

  • Get-DscConfiguration
  • - CategoryInfo          : InvalidResult: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Ge
      t-DscConfiguration], CimException
    - FullyQualifiedErrorId : GetOperationResultInvalidResultFormat,Get-DscConfiguration
    
    

Looks like the return params from Get-TargetResource need to be very specific...

Add xSPSearchFileType resource

The xSPSearchFileType resource will register a new file type with the search service app (or remove it). It should be structured as follows:

xSPSearchFileType PdfSearchCrawl
{
ServiceAppName = "Enterprise Search Service Application"
Name = "PDF"
Ensure = "Present"
}

Add xSPBlobCacheSettings resource

The xSPBlobCacheSettings resource will allow for configuration of the blob cache on the current server (through manipulating the web.config file). It should be structured as follows:

xSPBlobCacheSettings BlobCacheSettings 
{
    WebApplication = "SharePoint Sites"
    Zone = "Default"
    EnableCache = $true
    Location = "F:\BlobCache"
    MaxSize = 10
    FileTypes = "\.(gif|jpg|png|css|js)$"
}

Add xSPAppUrls resource

The xSPAppUrls resource will be used to set the app urls that will be used for the farm. It should be structured as follows:

xSPAppUrls AppUrls
{
AppDomain = "contosointranetapps.com"
AppPrefix = "app"
}

Add xSPSearchCrawlRule resource

The xSPSearchCrawlRule resource is used to set a crawl rule against the specified search service app. It should be structured as follows:

xSPSearchCrawlRule IntranetCrawlAccount
{
Path = "https://intranet.sharepoint.contoso.com"
ServiceAppName = "Enterprise Search Service Application"
Ensure = "Present"
CrawlConfiguration = "Include"
CrawlConfigurationRules = "FollowLinksNoPageCrawl,CrawlComplexUrls"
Authentication = "SpecificAccount"
AuthenticationCredentials = $Credentials
}

A combination of rules and ways of specifiying all of the appropriate options and combinations needs to be created to apply these rules correctly.

Add xSPHealthAnalyzerRuleState resource

The xSPHealthAnalyzerRuleState resource will be used to set the status of a specific health analyser rule for the farm in the central administration site (to ensure that a specific rule is either enabled/disabled and if it is set to fix automaticaly or not). It will be represented as below:

xSPHealthAnalyzerRuleState DisableDiskSpaceRule
{
Name = "Drives are at risk of running out of free space."
Ensure = "Absent"
InstallAcount = $InstallAccount
}

xSPHealthAnalyzerRuleState CompressDBsRule
{
Name = "Database has large amounts of unused space."
Ensure = "Present"
FixAutomatically = $true
InstallAcount = $InstallAccount
}

xSPInstallPrereqs argument formatting issue

xSPInstallPrereqs doesn't put a colon between argument names and values, e.g.

VERBOSE: [DSC-3]: [[xSPInstallPrereqs]InstallPrerequisites] Args for prereq installer are: /unattended /SQLNCli "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\sqlncli.msi" /PowerShell "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\Windows6.1-KB2506143-x64.msu" /NETFX "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\dotNetFx45_Full_setup.exe" /IDFX "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\Windows6.1-KB974405-x64.msu" /Sync "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\Synchronization.msi" /AppFabric "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\WindowsServerAppFabricSetup_x64.exe" /IDFX11 "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\MicrosoftIdentityExtensions-64.msi" /MSIPCClient "c:\DSC-Resources\Share
Point\prerequisiteinstallerfiles\setup_msipc_x64.msi" /WCFDataServices "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\WcfDataServices.exe" /KB2671763 "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\AppFabric1.1-RTM-KB2671763-x64-ENU.exe" /WCFDataServices56 "c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\WcfDataServices56.exe"

instead of

VERBOSE: [DSC-3]: [[xSPInstallPrereqs]InstallPrerequisites] Args for prereq installer are: /unattended /SQLNCli:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\sqlncli.msi" /PowerShell:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\Windows6.1-KB2506143-x64.msu" /NETFX:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\dotNetFx45_Full_setup.exe" /IDFX:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\Windows6.1-KB974405-x64.msu" /Sync:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\Synchronization.msi" /AppFabric:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\WindowsServerAppFabricSetup_x64.exe" /IDFX11:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\MicrosoftIdentityExtensions-64.msi" /MSIPCClient:"c:\DSC-Resources\Share
Point\prerequisiteinstallerfiles\setup_msipc_x64.msi" /WCFDataServices:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\WcfDataServices.exe" /KB2671763:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\AppFabric1.1-RTM-KB2671763-x64-ENU.exe" /WCFDataServices56:"c:\DSC-Resources\SharePoint\prerequisiteinstallerfiles\WcfDataServices56.exe"

Add xSPVisioServiceApp resource

The xSPVisioServiceApp resource will be sued to provision a new Visio services service application. It should be structured as per below.

xSPVisioServiceApp VisioServices
{
Name = "Visio Services Service Application"
Ensure = "Present"
AppPool = "SharePoint Web Services"
}

xSPSecureStoreServiceApp should use PSCredential instead of username and password parameters

This bug is a result of PSScriptAnalyzer scan:

RuleName                                                                         Severity              FileName                                                             Line                  Message                                              
--------                                                                                 --------                    --------                                                                    ----  -------                                              
PSAvoidUsingUserNameAndPassWordParams     Error                     MSFT_xSPSecureStoreServiceApp.psm1 122   Function 'Test-TargetResource' has both username and 
password parameters. A credential parameter of type PSCredential should be used.                         
PSAvoidUsingUserNameAndPassWordParams    Error                     MSFT_xSPSecureStoreServiceApp.psm1 51    Function 'Set-TargetResource' has both username and  
password parameters. A credential parameter of type PSCredential should be used.                                                                                 
PSAvoidUsingUserNameAndPassWordParams     Error                      MSFT__xSPSecureStoreServiceApp.psm1 1     Function 'Set-TargetResource' has both username and  
password parameters. A credential parameter of type PSCredential should be used.                         

We should have single parameter credential of type PSCredential instead of using both username and password parameters.

Add xSPWebAppPolicy resource

The xSPWebAppPolicy defines a specific policy to create against a web application. It should be structured as follows:

xSPWebAppPolicy AdminFullControlPolicy
{
Zones = "*"
User = "CONTOSO\SharePoint Administrators"
Permissions = "Full Control"
OperateAsSystem = $false
}

The Zones option here should use * to indicate that this is for all zones, otherwise an enum style value for the zones that are included (eg. "Intranet,Extranet,Default")

Add xSPOutgoingEmailSettings resource

The xSPOutgoingEmailSettings is responsible for setting outgoing email settings to either the whole form, or a specific web application. It should be structured as below:

xSPOutgoingEmailSettings MainWebAppOutgoingEmailSettings
{
WebAppUrl = "https://sharepoint.contoso.com"
SMTPServer = "mail.contoso.com"
FromAddress = "[email protected]""
ReplyToAddress = "[email protected]"
CharacterSet = "65001"
}

The WebAppUrl parameter should be optional here. Where it is not present the settings should be applied to the farm. Where it is specified, they should be applied to the specific web application instead.

xSPInstall requires PID

I was hoping to use xSPInstall to install SharePoint Foundation 2013, but will have to mark the PID property as not mandatory. Workaround is to use the Package resource, like this:

Package InstallSharePointFoundation
{
    Ensure             = "Present"
    Name               = "Microsoft SharePoint Foundation 2013 Core"
    Path               = "E:\SharePoint2013\Setup.exe"
    Arguments          = "/config E:\SharePoint2013\files\setupfarmsilent\config.xml"
    ProductID          = "90150000-1014-0000-1000-0000000FF1CE"
    ReturnCode         = 0
}

Session is Broken

Hi guys, the problem is most likely on my end, but using the singlefarm example you provided, I keep getting the following error:

This event indicates that a non-terminating error was thrown when DSCEngine was executing Set-TargetResource on MSFT_xSPCreateFarm DSC resource. FullyQualifiedErrorId is InvalidSessionState,localhost. Error Message is Cannot invoke the pipeline because the runspace is not in the Opened state. Current state of the runspace is 'Broken'..

The server reboots twice for the Prerequisites installation, then installed the SP bits without any issues. It is when I hit the xSPCreateFarm that things start going wrong. I suspect the xSPClearRemoteSession is the culprit. Here is my config (still the default):

xSPClearRemoteSessions ClearRemotePowerShellSessions
{
ClearRemoteSessions = $true
}

Any ideas/pointers as to what I may be doing wrong? Thanks

Nik

Add xSPSubscriptionSettingsServiceApp resource

The xSPSubscriptionSettingsService resource is used to create a new subscription settings service application and proxy. It will be structured as follows:

xSPSubscriptionSettingsServiceApp SubscriptionSettingsServiceApp
{
Name = "Subscription Settings Service Application"
AppPool = "SharePoint web services"
DatabaseServer = "SQL01.contoso.com"
DatabaseName = "SP_ManagedMetadata"
}

Add xSPAppManagementServiceApp resource

The xSPAppManagementServiceApp resource is used to create a new app management service application and proxy. It will be structured as follows:

xSPAppManagementServiceApp AppManagementServiceApp
{
Name = "App Management Service Application"
AppPool = "SharePoint web services"
DatabaseServer = "SQL01.contoso.com"
DatabaseName = "SP_ManagedMetadata"
}

Add xSPUserProfileProperty resource

The xSPUserProfileProperty resource is used to create/update user profile properties, specifying what is editable as well as sync details. It should be structured as per the below example:

xSPUserProfileProperty WorkEmailProperty
{
Name = "WorkEmail"
DisplayName = "Work Email"
Type = "Email"
Description = ""
PolicySetting = "Required"
PrivacySetting = "Everyone"
AllowUserEdit = $false
MappingConnectionName = "contoso.com"
MappingPropertyName = "mail"
MappingDirection = "Import"
}

Add xSPWorkManagementServiceApp resource

The xSPWorkManagementServiceApp resource will provision the work management service application. It should be structured as per below:

xSPWorkManagementServiceApp WorkManagementServiceApp
{
Name = "Work Management Service Application"
Ensure = "Present"
AppPool = "SharePoint Web Services"
}

This cmdlet should also create/remove a proxy object as well as the main service app.

Timeout error reported to LCM logs in xSPDistributedCache resource

When running the xSPDistributedCache resource in a farm that has more than 1 server running the xSPDistributedCache resource, the following timeout error is seen in the logs from the DSC LCM

Error occurred while performing the operation on host [HostName1]:22233 : ErrorCode<ERRCAdmin003>:SubStatus<ES0001>:Time-out occurred on net.tcp://[HostName1]:22233.

Note: The name of the server in the above example has been replaced with [HostName1].
The error does not appear to impact the provisioning, after seeing this distributed cache is still provisioned and running on each server and no obvious errors are seen.

Extend xSPWebApplication resource to include "workflow settings"

Extend the xSPWebAppliation resource top include the follow settings (seen in central admin under the "workflow settings" dialog)

  • Enable user defined workflows
  • Allow internal users with no site access to get tasks
  • Allow external users to get tasks with a copy of the document

Add xSPBCSModel resource

The xSPBCSModel resource will be used to import a specific BCS model to the farm and ensure it is always present. It should be structured as follows:

xSPBCSModel HRAppModel
{
Name = "HR Application"
Ensure = "Present"
ModelFile = "C:\bcsmodels\hr.bcdm"
FileType = "Model"
}

Add xSPQuotaTemplate resource

The xSPQuotaTemplate resource will be used to add or remove a quota template. It will be represented as below:

xSPQuotaTemplate NewQuotaTemplate
{
Name= "1GB"
StorageMaxInMB=1024
StorageWarningInMB=512
MaximumUsagePointsSolutions=300
WarningUsagePointsSolutions=200
Ensure=”Present”
}

xSPUsageApplication should use PSCredential instead of username and password parameters

This bug is a result of PSScriptAnalyzer scan:

RuleName                                                                         Severity              FileName                                                             Line                  Message                                              
--------                                                                                 --------                    --------                                                                    ----  -------                                                               
PSAvoidUsingUserNameAndPassWordParams    Error                      MSFT_xSPUsageApplication.psm1           112   Function 'Test-TargetResource' has both username and 
password parameters. A credential parameter of type PSCredential should be used.                          
PSAvoidUsingUserNameAndPassWordParams    Error                     MSFT_xSPUsageApplication.psm1            58    Function 'Set-TargetResource' has both username and  
password parameters. A credential parameter of type PSCredential should be used.                          
PSAvoidUsingUserNameAndPassWordParams    Error                     MSFT_ xSPUsageApplication.psm1           1     Function 'Get-TargetResource' has both username and
password parameters. A credential parameter of type PSCredential should be used.                          



We should have single parameter credential of type PSCredential instead of using both username and password parameters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.