Application developers, now a days store many of the configurable properties in the Property bags. As an administrator you might frequently be asked the value of these properties.
I used below scripts to check Properties at Farm, Web Application and Site Collection level.
I used below scripts to check Properties at Farm, Web Application and Site Collection level.
#Add PS SnapIn for SharePoint
# Get all the Properties from Farm Property bag
$myFarm = Get-SPFarm;
foreach ($prop in $myFarm.Properties.GetEnumerat or() | Sort-Object -Property Name) {
Write-Host " - " $prop.Name "->" $prop.Value
}
# Get all the Properties from Web Application Property bag
$myWebApp = Get-SPWebApplication "http://webapp"
foreach ($prop in $myWebApp.Properties.GetEnumer ator() | Sort-Object -Property Name) {
Write-Host " - " $prop.Name "->" $prop.Value
}
# Get all the Properties from Site Collection Property bag
$myWeb = Get-SPWeb "http://sitecollection"
foreach ($prop in $myWeb.Properties.GetEnumerato r() | Sort-Object -Property Name) {
Write-Host " - " $prop.Name "->" $prop.Value
}
Very helpful script
ReplyDeletethank you for sharing. Can you share more information like remove Property value from bag / change value
ReplyDeleteGreat Post!
ReplyDeleteThanks a lot for sharing!
I found this blog to be very useful!!
PowerShell Scripting Training in Bangalore
Okay ! I've been looking for some script like this one for hours ! Great Script, thanks a lot for sharing !
ReplyDeletethanks for sharing this information with us
ReplyDeletefull stack developer course
full stack developer course in Bangalore
This comment has been removed by the author.
ReplyDelete