en-US/about_SPWebAppPropertyBag.help.txt
.NAME
SPWebAppPropertyBag # Description **Type:** Distributed **Requires CredSSP:** No This resource is used to work with SharePoint Property Bags at the web application level. The account that runs this resource must be a farm administrator. The default value for the Ensure parameter is Present. When not specifying this parameter, the property bag is configured. .PARAMETER WebAppUrl Key - string The URL of the web application .PARAMETER Key Key - string The key of the SPWebApplication property .PARAMETER Value Write - String Value of the SPWebApplication property .PARAMETER Ensure Write - string Allowed values: Present, Absent Set to present to ensure the SPWebApplication property exists, or absent to ensure it is removed .PARAMETER InstallAccount Write - String POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 .EXAMPLE 1 This example shows how add property bag value in a web application. Configuration Example { param ( [Parameter(Mandatory = $true)] [PSCredential] $SetupAccount ) Import-DscResource -ModuleName SharePointDsc node localhost { SPWebAppPropertyBag APPLICATION_APPCodeProperty { PsDscRunAsCredential = $SetupAccount WebAppUrl = "https://web.contoso.com" Key = "KeyToAdd" Value = "ValueToAddOrModify" Ensure = "Present" } } } .EXAMPLE 2 This example shows how remove a property bag value in a web application. Configuration Example { param ( [Parameter(Mandatory = $true)] [PSCredential] $SetupAccount ) Import-DscResource -ModuleName SharePointDsc node localhost { SPWebAppPropertyBag APPLICATION_APPCodeProperty { PsDscRunAsCredential = $SetupAccount WebAppUrl = "https://web.contoso.com" Key = "KeyToRemove" Ensure = "Absent" } } } |