• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Spsdc 2014 o365_power_shell_csom_amitv
 

Spsdc 2014 o365_power_shell_csom_amitv

on

  • 215 views

The main objective of this session is to show you how you can leverage both PowerShell and Client Side Object Model (CSOM) to manage your SharePoint Online instance.

The main objective of this session is to show you how you can leverage both PowerShell and Client Side Object Model (CSOM) to manage your SharePoint Online instance.

Statistics

Views

Total Views
215
Views on SlideShare
206
Embed Views
9

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 9

https://twitter.com 7
http://lanyrd.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Spsdc 2014 o365_power_shell_csom_amitv Spsdc 2014 o365_power_shell_csom_amitv Presentation Transcript

    • Thanks to our Sponsors!!!
    • http://www.sharepointnutsandbolts.com/ Chis O’Brien - MVP Reference: http://www.sharepointnutsandbolts.com/2013/12/Usin g-CSOM-in-PowerShell-scripts-with-Office365.html Credit for this session
    • Self Promotion  Microsoft Community Contributor (MCC) Senior SharePoint Consultant @amitvasuMCP – SP 2013 BLOG – www.amitvasu.com/blog SharePoint Saturday DC
    • Agenda PowerShell + CSOM Background and CSOM Overview How to Start DEMO Final Thoughts Why PowerShell + CSOM Q/A SharePoint Saturday DC
    • “FTC to CAM – Stop creating content types and site columns declaratively” http://blogs.msdn.com/b/vesku/archive/2013/11/06/ftc-to-cam-stop-creating-content-types- and-site-columns-declaratively.aspx How I started PowerShell + CSOM SharePoint Saturday DC
    • Typical CT deployment process SharePoint Saturday DC
    • What is being recommended SharePoint Saturday DC
    • Challenge with O365  Guidance to not use declarative code for CT  You cannot use custom code in Sandbox solution.  Farm solutions are out of question. SharePoint Saturday DC
    • CSOM Overview  Client side library for remotely communicating with SharePoint  Introduced in SharePoint 2010  Expanded upon in SharePoint 2013 SharePoint Saturday DC CSOM Overview
    • How CSOM Works SharePoint Saturday DC
    • CSOM Overview  How CSOM works in SharePoint 2013 SharePoint Saturday DC
    • How CSOM Works  Create Context ClientContext ctx = new ClientContext("http://intranet.contoso.com");  Call Load and ExecuteQuery Before Accessing Value Properties Web web = ctx.Web; ctx.Load(web); ctx.ExecuteQuery(); Console.WriteLine(web.Title); SharePoint Saturday DC
    • Steps to start developing  Pick your Development environment  Local Machine  SharePoint 2013 Environment SharePoint Saturday DC
    • Local Machine  Required copy of all SharePoint Client DLL  Located at C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions15ISAPI  All DLLs that starts with Microsoft.SharePoint.Client  Reference them in your code from the location you copied them SharePoint Saturday DC
    • SharePoint Environment  No need to do anything other than referencing DLLs from ISAPI folder. SharePoint Saturday DC
    • Optional – Download SPO DLLs  Rene Modery - Script to download the SharePoint Online DLLs http://modery.net/script-to-download-the-sharepoint-online- dlls/?utm_source=rss&utm_medium=rss&utm_campaign=script-to-download- the-sharepoint-online-dlls SharePoint Saturday DC
    • Add reference to your DLLs $filePath = "c:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions15ISAPI" Set-Location $filePath Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll") Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.Runtime.dll") SharePoint Saturday DC
    • Authentication - SPO $userName = "SomeUser@SomeOrg.onmicrosoft.com" $siteUrl = "https://SomeSite.sharepoint.com" $pwd = Read-Host -AsSecureString $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredenti als($userName, $pwd) SharePoint Saturday DC
    • Authentication – On-Prem $userName = "SomeUser@SomeOrg.onmicrosoft.com" $siteUrl = "https://SomeSite.sharepoint.com" $pwd = Read-Host -AsSecureString $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) $ctx.Credentials = New-Object System.Net.NetworkCredential($userName, $pwd) SharePoint Saturday DC
    • Advantages  Repeatable and automated  Same script can be used across different environments  Extending out of the box PowerShell  Works with on-prem as well as SharePoint Online * SharePoint Saturday DC
    • Summary  Anything you can do with CSOM can be achieved using PowerShell + CSOM  Great way to extend PowerShell capabilities  Can be used with SharePoint Online and On-prem  Spend time understanding CSOM  Microsoft.SharePoint.Client namespace SharePoint Saturday DC
    • Thanks to our Sponsors!!!
    • Join us at #SharePint sponsored by Metalogix at Clyde’s of Chevy Chase in the RaceCar Bar Downstairs Why? To network with fellow SharePoint professionals What? SharePint!!! When? 5:30 PM Where? RaceCar Bar Downstairs 5441 Wisconsin Ave Chevy Chase, MD 20815 Thanks to? Metalogix!