Tag Archives: Moss

Change Publishing Page Layout using PowerShell

$spWeb = Get-SPWeb("http://abc.com/corp/tis/TISWorkspaces/Toxicologyproject/")
 $spFile = $spWeb.GetFile("http://abc.com/corp/tis/TISWorkspaces/Toxicologyproject/Pages/Home.aspx")
 $spFile.CheckOut("Online",$null)
 $spFile.Properties["PublishingPageLayout"] = "/corp/_catalogs/masterpage/DepartmentPageLayout.aspx, Department Page Layout"
 $spFile.Update()
 $spFile.CheckIn("Update page layout via PowerShell",[Microsoft.SharePoint.SPCheckinType]::MajorCheckIn)
 $spWeb.Dispose()

From: http://osric.com/chris/accidental-developer/2011/11/updating-a-sharepoint-pages-page-layout-using-powershell/

Get Content database Guid

Use SharePoint_config

SELECT id, name FROM OBJECTS
WHERE Properties LIKE ‘%Microsoft.SharePoint.Administration.SPContentDatabase%’

Check for sharepoint page edit mode using javascript

var inDesignMode = 
document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value;

if (inDesignMode == "1")

{ // page is in edit mode }

else

{ // page is in browse mode }

How to figure out Worker Process in SharePoint 2010

C:\Windows\System32\inetsrv>appcmd list wp

SharePoint Permission String Options

Member name Description
EmptyMask Has no permissions on the Web site. Not available through the user interface.
ViewListItems View items in lists, documents in document libraries, and view Web discussion comments.
AddListItems Add items to lists, add documents to document libraries, and add Web discussion comments.
EditListItems Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize Web Part Pages in document libraries.
DeleteListItems Delete items from a list, documents from a document library, and Web discussion comments in documents.