2

This is the option that I want to change via Powershell

enter image description here

Thanks!

3
+50

Adding to Robert's answer, which is correct for SharePoint online environment , if you have 2013 On Premise environment, you can use the below code:

$web = Get-SPWeb "https://sharepoint/sites/blog"
write-host $web.Properties["ms-blogs-skinid"]
$web.Properties["ms-blogs-skinid"] = 1
$web.Properties.update()

Valid values for ms-blogs-skinid: 0,1,2

Also, in case its SharePoint online and you dont want to use PnP, use it as below:

$SiteUrl = "https://tenant.sharepoint.com/teams/blog"
$context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($credential.UserName, $credential.Password)
$web = $context.Site.RootWeb
$props =  $web.AllProperties
$web.AllProperties["ms-blogs-skinid"] = "0";  # use 1 or 2 based on your requirement 
$web.Update()
$context.ExecuteQuery()
| improve this answer | |
  • Thank you! I have been looking for an answer for quite a while now. – Yashwanth Rao Nov 24 '16 at 6:40
  • welcome ! Glad i could help :) – Gautam Sheth Nov 24 '16 at 6:41
  • 1
    actually, my solution works just fine on premises also, just donwload the correct MSI: SharePointPnPPowerShell2013.msi – Robert Wagenaar Nov 24 '16 at 7:48
2

First install the Dev PnP Powershell tools:

https://github.com/officedev/PnP-PowerShell

Choose the correct MSI for your environment:

  • SharePoint 2013 on Premise: SharePointPnPPowerShell2013.msi
  • SharePoint 2016 on Premise: SharePointPnPPowerShell2016.msi
  • SharePoint 2013 online: SharePointPnPPowerShellOnline.msi

Then use the following Powershell commands (don't forget to fill in the correct values for the two variables in the first two lines of the script):

$SitecollectionUrl = "https://yourhostname/sites/test"
$RelativePathToBlogSite = "/sites/test/blog"

connect-sponline $SitecollectionUrl
$web = get-pnpweb $RelativePathToBlogSite
Set-PnPPropertyBagValue -web $web -key ms-blogs-skinid -Value 1

Values:

  • 0 = Basic
  • 1 = Boxed
  • 2 = Inline
| improve this answer | |
  • Thanks! I will keep this in mind while moving to SharePoint Online. – Yashwanth Rao Nov 24 '16 at 6:41
  • this works just fine on SharePoint on Premises too. Just download the On premises version of the tools: SharePointPnPPowerShell2013.msi – Robert Wagenaar Nov 24 '16 at 7:47
  • Sure i will take a look. – Yashwanth Rao Nov 24 '16 at 10:13
  • I can recommend it, it's very powerful and basically the only tool I ever use nowadays for doing Powershell with SharePoint – Robert Wagenaar Nov 24 '16 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.