12 Responses

Page 1 of 1
  1. greg roberts
    greg roberts at | | Reply

    Thanks steve for the great examples, are the csv files available so i have an idea of the format / info ?

    thanks greg

  2. Journal 11/26/2013 (a.m.) | Journal
    Journal 11/26/2013 (a.m.) | Journal at |

    […] SharePoint CSOM PowerShell Examples | Steve Hart […]

  3. Harpreet
    Harpreet at | | Reply

    Hi Steve. Can we Configure SharePoint Auditing Using CSOM PowerShell? Would appreciate if you could give an example. Thanks Harpreet

  4. Jozin
    Jozin at | | Reply

    Hi Steve,
    Our company sharepoint (Office 365) contains also several RSS feeds, I’ve got this message when viewing website from IE browser:
    “You are viewing a feed that contains frequently updated content …”
    How it is possible to download xml file out of this feed (website) using PowerShell?
    I can authenticate with sharepoint using CSOM but do not what to do next.
    This script works OK for standard website, not for Sharepoint.
    $doc = New-Object System.Xml.XmlDocument
    I am getting this error when using for company Sharepoint:
    “The remote server returned an error: (403) Forbidden.”

    Thanks for your time considering this comment.

  5. Jozin
    Jozin at | | Reply

    Hi Steve,

    thanks for advice.

    Combination of WebClient and Sharepoint Credentials is working OK:

    $client = New-Object System.Net.WebClient
    $client.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($User, $SecurePassword)
    $client.Headers.Add(“X-FORMS_BASED_AUTH_ACCEPTED”, “f”)
    $client.DownloadFile($SiteURL, $file)

  6. Haniel
    Haniel at | | Reply

    Hi Steve,

    Great post! I was able to follow your steps to get authenticated but whenever I try to retrieve information such as $clientContext.Web it returns null.

    I’m using the SharePoint 2013 DLL’s .NET v4.5, PowerShell 5.0 with .NET 4.


  7. Jaco
    Jaco at | | Reply

    Hi Steve,

    Great post! Thank you.

    Using your ‘Add Sample Documents’ example I should be able to create a folder.
    I know there is a Microsoft.SharePoint.Client.FolderCollection.Add function but I just cannot get it right.

    Any help please?


Leave a Reply