How to view / change web site properties in SharePoint by PowerShell

In SharePoint, Property bags are usually used to store values / configurations related to a web site. Reading / Writing them via PowerShell is really easy just fire up “SharePoint 2010 Management Shell” from the Start Menu and type the following commands:

$web = Get-SPWeb "http://yourwebsite"
$web.Properties["PropertyName"] = "Property Value"