2011年1月17日

SharePoint PowerShell Script Set Custom MasterPage Url

摘要: 在SharePoint 项目中使用自定义母版页,在部署或者发布项目版本的时候需要设置母版页,使用该脚本可以进行初始化设置。$site = get-spsite(http://server);$web = $site.RootWeb;$web.Files[0].delete();$web.CustomerMasterUrl = "/_catalogs/masterpage/custom.master";$web.update(); 阅读全文

posted @ 2011-01-17 23:28 张大明 阅读(247) 评论(0) 推荐(0)

SharePoint PowerShell Script Use List,Add Field To List ,Create Discussion

摘要: //得到List$web = get-spweb(http://dexter-pc:90s);$CustomerList = $web.Lists["Customer"];//给List添加字段$CustomerList.Fields.Add("Customer_Name","Text","false");$CustomerList.update();//给List 添加Item$CustomerItem = $CustomerList.AddItem();$CustomerItem["Customer_Id"] = "10000";$CustomerItem["Customer_Name"] 阅读全文

posted @ 2011-01-17 23:17 张大明 阅读(390) 评论(0) 推荐(0)

SharePoint PowerShell Script Create Document Library,Upload File

摘要: //创建文档库$web = get-spweb -Identity http://dexter-pc:90;$listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary;$web.Lists.Add("Document Name","Document Desc",$listTemplate);//得到文档库$spDocumentLibrary = $web.GetList("Document Name");//更该文档库的Description$spDocumentLibrary.Description = 阅读全文

posted @ 2011-01-17 22:41 张大明 阅读(709) 评论(0) 推荐(0)

导航