250 likes | 415 Views
SPSite & SPWebs. SharePoint + PowerShell User Group November 21, 2012. Agenda. Hello! Group Logistics ( GoToMeeting / website / register / email / twitter) SPSite & SPWeb Useful Scripts Next meeting SURVEY!!!. Survey. Excel Survey (via SkyDrive) http :// sdrv.ms/T49Afu
E N D
SPSite & SPWebs SharePoint + PowerShell User Group November 21, 2012
Agenda Hello! Group Logistics (GoToMeeting/ website / register / email / twitter) SPSite & SPWeb Useful Scripts Next meeting SURVEY!!!
Survey • Excel Survey (via SkyDrive) • http://sdrv.ms/T49Afu More info on Excel Surveys • http://blogs.office.com/b/microsoft-excel/archive/2012/11/16/excel-surveys.aspx
Hello! Raymond Mitchell • SharePoint Consultant • http://www.Rackspace.com • Author • Dad • Information Worker Kid • http://www.iwkid.com • SharePoSHing since 2008
SPSite & SPWeb SPSite = Site Collection SPWeb = Web Site
SPSite & SPWeb • Get-SPSite • Shows 20 by default • Use -Limit ALL to show all • Can limit by URL, Content Database, Web Application
SPSite & SPWeb Find SPSite Properties $site | gm | ? { $_.Definition.ToLower().Contains("database") } | ft
SPSite & SPWeb ContentDatabase Owner RecycleBinSPRecycleBinItemCollection
SPSite & SPWeb • Site Collections are a containment object • SPWebCollection • Galleries • Web Parts • Site Columns • Content Types • List/Web Templates
SPSite & SPWeb • GetCatalog(SPListTemplateType) • WebTemplateCatalogSite template gallery. Value = 111. • WebPartCatalogWeb Part gallery. Value = 113. • ListTemplateCatalogList Template gallery. Value = 114. • MasterPageCatalogMaster Page gallery. Value = 116. http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splisttemplatetype.aspx
SPSite & SPWeb GetCustomListTemplates GetCustomWebTemplates GetWebTemplates(LCID)
SPSite & SPWeb Creating a new SPSite New-SPSite -url ... -OwnerAlias ... -Name ... -Template ...
SPSite & SPWeb SPSite = Site Collection SPWeb = Web Site
SPSite & SPWeb • SPSite.RootWeb • SPSite.AllWebs • Get-SPWeb • By URL • By SPSite • By Filter:$site | Get-SPWeb-filter {$_.Template -eq "STS#1"}
SPSite & SPWeb • Lists • Folders / Files • Navigation • QuickLaunch • TopNavigationBar • TreeViewEnabled • RecycleBin • IsRootWeb • WebTemplate, WebTemplateId
SPSite & SPWeb ListTemplates WorkflowTemplates AvailableContentTypesvsContentTypes AvailableFieldsvsFields
SPSite & SPWeb • Properties (SPPropertyBag)vsAllProperties (Hashtable) • Use AllProperties! • AddProperty() • DeleteProperty()
SPSite & SPWeb Groups (only those with assigned permissions) SiteGroups (all groups) Users SiteUsers Roles (obsolete) RoleDefinitions RoleAssignments
SPSite & SPWeb Creating a new SPWeb New-SPWeb http://localhost/test - Template "STS#0" http://technet.microsoft.com/en-us/library/ff607579.aspx
YOUR scripts! • Jason Himmelstein (@sharepointlhorn) • Automatically log your PowerShell session every time • http://www.sharepointlonghorn.com/Lists/Posts/Post.aspx?ID=78
Next Meeting Wednesday, December 19th SharePoint Solutions & Features Matthias Einig (@mattein)SharePoint Solution Deployerhttp://spsd.codeplex.com
Resources • PowerShell + SharePoint forum at PowerShell.org: • http://powershell.org/discuss/viewforum.php?f=12 • PowerShell Summit: April 22-24http://powershell.org/summit
Survey • Excel Survey (via SkyDrive) • http://sdrv.ms/T49Afu More info on Excel Surveys • http://blogs.office.com/b/microsoft-excel/archive/2012/11/16/excel-surveys.aspx