-
Notifications
You must be signed in to change notification settings - Fork 107
SPCacheAccounts
dscbot edited this page Mar 17, 2023
·
18 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
WebAppUrl | Key | String | The URL of the web application to set the accounts for | |
SuperUserAlias | Required | String | The account name for the super user | |
SuperReaderAlias | Required | String | The account name for the super reader | |
SetWebAppPolicy | Write | Boolean | Should the web app policy be set for these accounts? |
Type: Distributed Requires CredSSP: No
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).
This example sets the super use and reader accounts for the specified web app. It will also set the appropriate web app policies by default for these accounts.
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPCacheAccounts SetCacheAccounts
{
WebAppUrl = "http://sharepoint.contoso.com"
SuperUserAlias = "DEMO\svcSPSuperUser"
SuperReaderAlias = "DEMO\svcSPReader"
PsDscRunAsCredential = $SetupAccount
}
}
}
This example sets the super use and reader accounts for the specified web app. It will not set the web app policies for these accounts though, allowing them to be controlled elsewhere (either manually or with SPWebAppPolicy)
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPCacheAccounts SetCacheAccounts
{
WebAppUrl = "http://sharepoint.contoso.com"
SuperUserAlias = "DEMO\svcSPSuperUser"
SuperReaderAlias = "DEMO\svcSPReader"
SetWebAppPolicy = $false
PsDscRunAsCredential = $SetupAccount
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations