PS SharePoSH:\> Lists & Views SharePoint + PowerShell User Group September 14, 2012
PS SharePoSH:\> Agenda Hello! Group Logistics (GoToMeeting/ website / register / / twitter) Lists & Views Useful Scripts Next meeting
PS SharePoSH:\> Raymond Mitchell SharePoint Consultant – Author Dad Information Worker Kid – SharePoSHing since 2008 Hello!
PS SharePoSH:\> What about you?
PS SharePoSH:\> Lists & Views Lists & Views Basics Review SPListCollection SPList Creating Lists (templates) SPField SPView
PS SharePoSH:\> List & Views Lists – View all site content – Hidden lists (Galleries, Workflow Support, User Info) – Lists vs. Libraries Views – Shared and Personal – Hidden
PS SharePoSH:\> SPListCollection SPWeb.Lists Filter by Type / Hidden $web.Lists | ? { $_.BaseType -eq "DocumentLibrary" -and $_.Hidden -eq $false } | ft Title, Hidden, RootFolder
PS SharePoSH:\> SPList SPWeb.Lists[title] SPWeb.GetList(url) SPListCollection.GetList(GUID, bool) SPListCollection.TryGetList(title)
PS SharePoSH:\> SPList Common Properties – Title, Description, Hidden, Versioning, DefaultView, Items, BaseType – RootFolder, EventReceivers, ContentTypes, WorkflowAssociations Common Methods – GetItems – GetItemById us/library/microsoft.sharepoint.splist_properties
PS SharePoSH:\> Creating Lists SPListCollection.Add(title, description, template) SPListTemplateType ( us/library/microsoft.sharepoint.splisttemplatetype) us/library/microsoft.sharepoint.splisttemplatetype SPWeb.ListTemplates SPSite.GetCustomListTemplates(web)
PS SharePoSH:\> SPField SPFieldCollection.Add(name, Type, bool) SPFieldType ( us/library/microsoft.sharepoint.spfieldtype) us/library/microsoft.sharepoint.spfieldtype
PS SharePoSH:\> SPView SPList.DefaultView ViewFields.Add(title)
PS SharePoSH:\> YOUR scripts!
PS SharePoSH:\> Next Meeting Wednesday, October 17 th Topics: – Publishing – IIS / web.config – Security – Crazy Stuff
PS SharePoSH:\> Resources PowerShell + SharePoint forum at PowerShell.org: –