How so set web properties within a web template

If you create a new web, based on a custom web template, you can set web properties like this:

  1. In your Visual Studio solution containing the web template, create a new module or use an existing one
  2. Paste the PropertyBag section into your module
  3. Put your module into a feature, that gets activated within your web template

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="MeetingPage">
    […]
    </Module>
    <PropertyBag Url="" ParentType="Web" RootWebOnly="FALSE">
    <Property Name="WebTemplateName" Type="string" Value="Atia-Template"/>
    </PropertyBag>
    </Elements>

In this example the Key “WebTemplateName” with Value “Atia-Template” is added to the web properties.
To check this you can use PowerShell:

$web=Get-SPWeb *your url*
$web.AllProperties