Last active
August 29, 2015 14:00
-
-
Save mdnmdn/11396985 to your computer and use it in GitHub Desktop.
Manage Sharepoint element property bag from powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { | |
Add-PSSnapin "Microsoft.SharePoint.PowerShell" | |
} | |
$web = Get-SPWeb 'http://win13a/sites/dev' | |
$web.AllProperties['PropertyName'] = '312' | |
$web.Update() | |
$webApp = Get-SPWebApplication 'http://win13a/' | |
$webApp.Properties['PropertyName'] = '312' | |
$webApp.Update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment