DiscussionBoard on Sharepoint Online Root SiteCollection

…this post was published on 2014 October 19.

If you will try to add a Discussion Board ​on your Sharepoint Online’root site collection, you will can’t using GUI. As usual, I tried to add it using <<Add App>> from web menu interface. But there are any DiscussionBoard.

I tried also to import a template from another site. The importing procedure was OK but it is missing from the Web Interface <<Add App>>.

So, the resolution could be Powershell Specific Custom Object Model.The code to do it, is this one:
First part is to create the context, the second one is to create the DiscussionBoard list.

Part One
  $loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint.Client”)
     $loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint.Client.Runtime”)
     $User = “SharepointOnlineUseraccount@domain.onmicrosoft.com”
     $Context = New-Object Microsoft.SharePoint.Client.ClientContext($WebUrl)
     $credentials = Get-Credential
     $Context.Credentials = New-Object   Microsoft.SharePoint.Client.SharePointOnlineCredentials($credentials.Username, $credentials.Password)

Part Two
    $noua_lista = New-Object  Microsoft.SharePoint.Client.ListCreationInformation
    $noua_lista = $context.Web.Lists.add($noua_lista)

For more details about Lists Templates, check this link

This entry was posted in CSOM, Sharepoint Online. Bookmark the permalink.