Thursday, May 25, 2017

Hide Top Bar, Ribbon, and Quick Launch - SharePoint 2013

How to Hide Top Bar, Ribbon, and Quick Launch in SharePoint 2013 with css?

Edit page and add Content Editor Web Part














Insert code

<style type="text/css">
    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
    .s4-ca {margin-left:0px !important; margin-right:0px !important;}
    .ms-core-navigation { display: none; }
    #contentBox { margin-left: 0; }
</style>



Wednesday, May 24, 2017

Unable to delete site collection - SharePoint 2013

How to delete corrupted SharePoint Site Collection?

Error: Remove-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack>


 




Solution:

$site = Get-SPSite https://siteurl

$siteId = $site.Id

$siteDatabase = $site.ContentDatabase

$siteDatabase.ForceDeleteSite($siteId, $false, $false)