Pages

Monday, January 16, 2012

Sharepoint PowerShell commands

$web=Get-SPWeb http://sharepoint"
$list=$web.Lists["Candidates"]
$list.AllowDeletion=$true;
$list.Update()
$list.Delete()

-----
List members of any object 

$objects=Get-Process
$object=Get-Process "process name"
$object | member





$subweb=$web.webs["subweb"]

-----------------
site manager
http://sharepoint/_layouts/Sitemanager.aspx

copy  content from web site to others




windows updates can delete SharePoint configurations, and all in _layout
----------------------

Edit public URLs in sharepoint
in Central Administration


-------------------------------------------




SharePoint Content Deployment Wizard


http://spdeploymentwizard.codeplex.com/

------------------------------------------------------
using the client API to query the SharePoint objects

 ClientContext remoteCtx = null;
remoteCtx = new ClientContext(siteUrl);
Web remoteWeb = remoteCtx.Web;
remoteCtx.Load(remoteWeb);

//
//always use load the remoteCtx.ExecuteQuery() as batch execute
// like
// remoteCtx.Load(remoteWeb.Lists);
//    remoteCtx.Load(otehr objects);
///  remoteCtx.ExecuteQuery()


remoteCtx.ExecuteQuery();
Console.WriteLine(" Success!");
Console.Write("Press any key to exit...");
Console.ReadLine();

No comments:

Post a Comment