13 Responses

Page 1 of 1
  1. XJMT
    XJMT at | | Reply

    Interesting. Do you know the CSOM statements to add a column to a list? Thanks.

  2. Rajendar
    Rajendar at | | Reply

    Hi Steve,

    i’m writing the following code to print the list names,
    #This works on SharePoint Online sites!

    # it will print the all list name in site

    $loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint.Client”)
    $loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint.Client.Runtime”)
    $webUrl = Read-Host -Prompt “Give Site Url”
    #”https://michaelbl.sharepoint.com”
    $username = Read-Host -Prompt “Please enter User Name”
    #michaelbl@michaelbl.onmicrosoft.com”
    $password = Read-Host -Prompt “Enter password” -AsSecureString

    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
    $web = $ctx.Web
    $lists = $web.Lists
    $ctx.Load($lists)
    #$ctx.ExecuteQuery()

    $lists| select -Property Title

    but i’m not bale to connect the SharePoint2013 online i’m getting an error like

    Error:
    New-Object : Cannot find type
    [Microsoft.Sharepoint.Client.SharepointOnlineCredentials]: make sure the
    assembly containing this type is loaded.

  3. Rajendar
    Rajendar at | | Reply

    Hi Steve,

    i have executed run the above script what you given, but it getting below error

    New-Object : Exception calling “.ctor” with “2” argument(s): “msoidcliL.dll”

    1. Carlos
      Carlos at | | Reply

      Hello how did you fix the issue New-Object : Exception calling “.ctor” with “2” argument(s): “msoidcliL.dll”

      I’m getting an error like this

      New-Object : Exception calling “.ctor” with “2” argument(s): “The ‘username’ argument is invalid”

  4. jlogan
    jlogan at | | Reply

    I am getting the same error as Rajender.

    New-Object : Cannot find type
    [Microsoft.SharePoint.Client.SharePointOnlineCredentials]: make sure the
    assembly containing this type is loaded.

    Any thoughts on this?

  5. Kevin Parker
    Kevin Parker at | | Reply

    Your address for the SharePoint Service 2013 Client Components SDK is missing a 5 at the end. That link goes to “Office 2003 Editions: Publisher VBA Language Reference”. 🙂

    http://www.microsoft.com/en-us/download/details.aspx?id=35585

  6. Khumtemu
    Khumtemu at | | Reply

    Great Post. There is one thing I am trying to accomplish with an update to this code. Is it possible to have multiple lists within an Array? I am able to do this with SharePoint OnPremise with PowerShell.

    Thanks,

Leave a Reply