SlideShare ist ein Scribd-Unternehmen logo
1 von 31
THANK YOU
EVENT SPONSORS
• Please visit them and inquire about
their products & services
• To win prizes make sure to get your
bingo card stamped by ALL 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 Toronto
Agenda
PowerShell + CSOM
Background and CSOM Overview
How to Start DEMO
Final Thoughts
Why PowerShell + CSOM
Q/A
SharePoint Saturday Toronto
Agenda
“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 Toronto
Typical CT deployment process
SharePoint Saturday Toronto
What is being recommended
SharePoint Saturday Toronto
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 Toronto
CSOM Overview
 Client side library for remotely communicating with
SharePoint
 Introduced in SharePoint 2010
 Expanded upon in SharePoint 2013
SharePoint Saturday Toronto
CSOM Overview
How CSOM Works
SharePoint Saturday Toronto
How CSOM Works –SP 2013
 SharePoint 2013
SharePoint Saturday Toronto
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 Toronto
Steps to start developing
 Pick your Development environment
 Local Machine
 SharePoint 2013 Environment
SharePoint Saturday Toronto
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 Toronto
SharePoint Environment
 No need to do anything other than referencing
DLLs from ISAPI folder.
SharePoint Saturday Toronto
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 Toronto
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 Toronto
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 Toronto
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 Toronto
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 Toronto
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 Toronto
THANK YOU
EVENT SPONSORS
• Please visit them and inquire about
their products & services
• To win prizes make sure to get your
bingo card stamped by ALL sponsors
Spsnyc 2014   o365 power shell csom

Weitere ähnliche Inhalte

Andere mochten auch

Ke hoach tao website moi 1
Ke hoach tao website moi 1Ke hoach tao website moi 1
Ke hoach tao website moi 1Thế Minh
 
Las UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedades
Las UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedadesLas UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedades
Las UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedadesJosé David Vergara López
 
TrialPay Security Tech Talk at Stanford ACM
TrialPay Security Tech Talk at Stanford ACMTrialPay Security Tech Talk at Stanford ACM
TrialPay Security Tech Talk at Stanford ACMhackingtrialpay
 
Seven simple steps for a wonderful outlook on life
Seven simple steps for a wonderful outlook on lifeSeven simple steps for a wonderful outlook on life
Seven simple steps for a wonderful outlook on lifespreadmorehappy.com
 
WP_Cost-theHiddenKiller_Final
WP_Cost-theHiddenKiller_FinalWP_Cost-theHiddenKiller_Final
WP_Cost-theHiddenKiller_FinalVern Imrich
 
African american-consumer-untold-story-sept-2015
African american-consumer-untold-story-sept-2015African american-consumer-untold-story-sept-2015
African american-consumer-untold-story-sept-2015Loyalty Consultants FZ
 
Banques et Assurances : Comment lutter avec une plus grande efficacite contre...
Banques et Assurances : Comment lutter avec une plus grande efficacite contre...Banques et Assurances : Comment lutter avec une plus grande efficacite contre...
Banques et Assurances : Comment lutter avec une plus grande efficacite contre...BRIVA
 
INDUS VALLEY CIVILISATION - ARISE ROBY
INDUS VALLEY CIVILISATION - ARISE ROBYINDUS VALLEY CIVILISATION - ARISE ROBY
INDUS VALLEY CIVILISATION - ARISE ROBYArise Roby
 
Spsto 2013 whats_newinworkflows_amitvasu.
Spsto 2013 whats_newinworkflows_amitvasu.Spsto 2013 whats_newinworkflows_amitvasu.
Spsto 2013 whats_newinworkflows_amitvasu.amitvasu
 
Lenda padeira de aljubarrota.pps - Diogo Silva, 11.ºB
Lenda padeira de aljubarrota.pps - Diogo Silva, 11.ºBLenda padeira de aljubarrota.pps - Diogo Silva, 11.ºB
Lenda padeira de aljubarrota.pps - Diogo Silva, 11.ºBmundonovoesds
 

Andere mochten auch (20)

Evaluation 4
Evaluation 4Evaluation 4
Evaluation 4
 
Evaluation 2
Evaluation 2Evaluation 2
Evaluation 2
 
Ke hoach tao website moi 1
Ke hoach tao website moi 1Ke hoach tao website moi 1
Ke hoach tao website moi 1
 
Las UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedades
Las UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedadesLas UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedades
Las UVA, Urbanismo Cívico Pedagógico, Arquitectura que transforma sociedades
 
TrialPay Security Tech Talk at Stanford ACM
TrialPay Security Tech Talk at Stanford ACMTrialPay Security Tech Talk at Stanford ACM
TrialPay Security Tech Talk at Stanford ACM
 
Stb en 12594
Stb en 12594Stb en 12594
Stb en 12594
 
Stb 1674 2006
Stb 1674 2006Stb 1674 2006
Stb 1674 2006
 
Seven simple steps for a wonderful outlook on life
Seven simple steps for a wonderful outlook on lifeSeven simple steps for a wonderful outlook on life
Seven simple steps for a wonderful outlook on life
 
Prepositions of places
Prepositions of placesPrepositions of places
Prepositions of places
 
WP_Cost-theHiddenKiller_Final
WP_Cost-theHiddenKiller_FinalWP_Cost-theHiddenKiller_Final
WP_Cost-theHiddenKiller_Final
 
Building life
Building lifeBuilding life
Building life
 
POEMA Ciudadana
POEMA CiudadanaPOEMA Ciudadana
POEMA Ciudadana
 
African american-consumer-untold-story-sept-2015
African american-consumer-untold-story-sept-2015African american-consumer-untold-story-sept-2015
African american-consumer-untold-story-sept-2015
 
Young scients at iiif 2016
Young scients at iiif 2016Young scients at iiif 2016
Young scients at iiif 2016
 
Banques et Assurances : Comment lutter avec une plus grande efficacite contre...
Banques et Assurances : Comment lutter avec une plus grande efficacite contre...Banques et Assurances : Comment lutter avec une plus grande efficacite contre...
Banques et Assurances : Comment lutter avec une plus grande efficacite contre...
 
Ap aimp
Ap aimpAp aimp
Ap aimp
 
INDUS VALLEY CIVILISATION - ARISE ROBY
INDUS VALLEY CIVILISATION - ARISE ROBYINDUS VALLEY CIVILISATION - ARISE ROBY
INDUS VALLEY CIVILISATION - ARISE ROBY
 
Spsto 2013 whats_newinworkflows_amitvasu.
Spsto 2013 whats_newinworkflows_amitvasu.Spsto 2013 whats_newinworkflows_amitvasu.
Spsto 2013 whats_newinworkflows_amitvasu.
 
Lenda padeira de aljubarrota.pps - Diogo Silva, 11.ºB
Lenda padeira de aljubarrota.pps - Diogo Silva, 11.ºBLenda padeira de aljubarrota.pps - Diogo Silva, 11.ºB
Lenda padeira de aljubarrota.pps - Diogo Silva, 11.ºB
 
Different kinds of Probability
Different kinds of ProbabilityDifferent kinds of Probability
Different kinds of Probability
 

Ähnlich wie Spsnyc 2014 o365 power shell csom

Spsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasuSpsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasuamitvasu
 
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMSPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMamitvasu
 
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...Comunidade Portuguesa de SharePoiint
 
Intro to SharePoint for Developers
Intro to SharePoint for DevelopersIntro to SharePoint for Developers
Intro to SharePoint for DevelopersRob Wilson
 
Sps boston 2014_o365_power_shell_csom_amitv
Sps boston 2014_o365_power_shell_csom_amitvSps boston 2014_o365_power_shell_csom_amitv
Sps boston 2014_o365_power_shell_csom_amitvamitvasu
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 Mark Rackley
 
Spsdc what's new in share point 2013 workflow
Spsdc   what's new in share point 2013 workflowSpsdc   what's new in share point 2013 workflow
Spsdc what's new in share point 2013 workflowamitvasu
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenO365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenNCCOMMS
 
Full trust code is not dead
Full trust code is not deadFull trust code is not dead
Full trust code is not deadShawn Beeson
 
build -test and deploy software aplplications with visual studio alm 2012-2013
build -test and deploy  software aplplications with visual studio alm 2012-2013build -test and deploy  software aplplications with visual studio alm 2012-2013
build -test and deploy software aplplications with visual studio alm 2012-2013Hassan Fadili
 
Build and Deploy Provider-hosted SharePoint Add-ins
Build and Deploy Provider-hosted SharePoint Add-insBuild and Deploy Provider-hosted SharePoint Add-ins
Build and Deploy Provider-hosted SharePoint Add-insDanny Jessee
 
SharePoint Governance: From Chaos to Success in 10 Steps
SharePoint Governance: From Chaos to Success in 10 StepsSharePoint Governance: From Chaos to Success in 10 Steps
SharePoint Governance: From Chaos to Success in 10 StepsJoel Oleson
 
Achieve quick wins in your organization with Power Automate
Achieve quick wins in your organization with Power AutomateAchieve quick wins in your organization with Power Automate
Achieve quick wins in your organization with Power AutomateParas Dodhia
 
#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfx
#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfx#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfx
#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfxVincent Biret
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery GuideMark Rackley
 

Ähnlich wie Spsnyc 2014 o365 power shell csom (20)

Spsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasuSpsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasu
 
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMSPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
 
Introducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFxIntroducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFx
 
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
 
Intro to SharePoint for Developers
Intro to SharePoint for DevelopersIntro to SharePoint for Developers
Intro to SharePoint for Developers
 
Sps boston 2014_o365_power_shell_csom_amitv
Sps boston 2014_o365_power_shell_csom_amitvSps boston 2014_o365_power_shell_csom_amitv
Sps boston 2014_o365_power_shell_csom_amitv
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013
 
Spsdc what's new in share point 2013 workflow
Spsdc   what's new in share point 2013 workflowSpsdc   what's new in share point 2013 workflow
Spsdc what's new in share point 2013 workflow
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenO365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
 
Full trust code is not dead
Full trust code is not deadFull trust code is not dead
Full trust code is not dead
 
KMA Deck -C. McNulty discusses ecm wcm-upgrades2010 - nyc
KMA Deck -C. McNulty discusses ecm wcm-upgrades2010 - nycKMA Deck -C. McNulty discusses ecm wcm-upgrades2010 - nyc
KMA Deck -C. McNulty discusses ecm wcm-upgrades2010 - nyc
 
build -test and deploy software aplplications with visual studio alm 2012-2013
build -test and deploy  software aplplications with visual studio alm 2012-2013build -test and deploy  software aplplications with visual studio alm 2012-2013
build -test and deploy software aplplications with visual studio alm 2012-2013
 
Managesp 160805190411
Managesp 160805190411Managesp 160805190411
Managesp 160805190411
 
Build and Deploy Provider-hosted SharePoint Add-ins
Build and Deploy Provider-hosted SharePoint Add-insBuild and Deploy Provider-hosted SharePoint Add-ins
Build and Deploy Provider-hosted SharePoint Add-ins
 
SharePoint Governance: From Chaos to Success in 10 Steps
SharePoint Governance: From Chaos to Success in 10 StepsSharePoint Governance: From Chaos to Success in 10 Steps
SharePoint Governance: From Chaos to Success in 10 Steps
 
Achieve quick wins in your organization with Power Automate
Achieve quick wins in your organization with Power AutomateAchieve quick wins in your organization with Power Automate
Achieve quick wins in your organization with Power Automate
 
#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfx
#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfx#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfx
#SPSBurgh 2018 How to do #devops with the #SharePoint Framework #spfx
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 

Mehr von amitvasu

Introducing-Loop.pdf
Introducing-Loop.pdfIntroducing-Loop.pdf
Introducing-Loop.pdfamitvasu
 
Updating your classic team site to use new office 365 features amit vasu
Updating your classic team site to use new office 365 features   amit vasuUpdating your classic team site to use new office 365 features   amit vasu
Updating your classic team site to use new office 365 features amit vasuamitvasu
 
Introduction to azure functions
Introduction to azure functionsIntroduction to azure functions
Introduction to azure functionsamitvasu
 
Office 365 Directory Synchronization
Office 365 Directory SynchronizationOffice 365 Directory Synchronization
Office 365 Directory Synchronizationamitvasu
 
Office 365 directory synchronization - SPSDC Reston
Office 365 directory synchronization - SPSDC RestonOffice 365 directory synchronization - SPSDC Reston
Office 365 directory synchronization - SPSDC Restonamitvasu
 
Tspug 2015 dirsync_amit_v_momentum
Tspug 2015 dirsync_amit_v_momentumTspug 2015 dirsync_amit_v_momentum
Tspug 2015 dirsync_amit_v_momentumamitvasu
 
Sps albany 2014_workflows_amit_vasu
Sps albany 2014_workflows_amit_vasuSps albany 2014_workflows_amit_vasu
Sps albany 2014_workflows_amit_vasuamitvasu
 
Spsdc using sp2013 to crawl sp2010 farm
Spsdc using sp2013 to crawl sp2010 farmSpsdc using sp2013 to crawl sp2010 farm
Spsdc using sp2013 to crawl sp2010 farmamitvasu
 
Sps ottawa 2013_workflows_amit_vasu
Sps ottawa 2013_workflows_amit_vasuSps ottawa 2013_workflows_amit_vasu
Sps ottawa 2013_workflows_amit_vasuamitvasu
 
Using workflows in share point 2010
Using workflows in share point 2010Using workflows in share point 2010
Using workflows in share point 2010amitvasu
 

Mehr von amitvasu (10)

Introducing-Loop.pdf
Introducing-Loop.pdfIntroducing-Loop.pdf
Introducing-Loop.pdf
 
Updating your classic team site to use new office 365 features amit vasu
Updating your classic team site to use new office 365 features   amit vasuUpdating your classic team site to use new office 365 features   amit vasu
Updating your classic team site to use new office 365 features amit vasu
 
Introduction to azure functions
Introduction to azure functionsIntroduction to azure functions
Introduction to azure functions
 
Office 365 Directory Synchronization
Office 365 Directory SynchronizationOffice 365 Directory Synchronization
Office 365 Directory Synchronization
 
Office 365 directory synchronization - SPSDC Reston
Office 365 directory synchronization - SPSDC RestonOffice 365 directory synchronization - SPSDC Reston
Office 365 directory synchronization - SPSDC Reston
 
Tspug 2015 dirsync_amit_v_momentum
Tspug 2015 dirsync_amit_v_momentumTspug 2015 dirsync_amit_v_momentum
Tspug 2015 dirsync_amit_v_momentum
 
Sps albany 2014_workflows_amit_vasu
Sps albany 2014_workflows_amit_vasuSps albany 2014_workflows_amit_vasu
Sps albany 2014_workflows_amit_vasu
 
Spsdc using sp2013 to crawl sp2010 farm
Spsdc using sp2013 to crawl sp2010 farmSpsdc using sp2013 to crawl sp2010 farm
Spsdc using sp2013 to crawl sp2010 farm
 
Sps ottawa 2013_workflows_amit_vasu
Sps ottawa 2013_workflows_amit_vasuSps ottawa 2013_workflows_amit_vasu
Sps ottawa 2013_workflows_amit_vasu
 
Using workflows in share point 2010
Using workflows in share point 2010Using workflows in share point 2010
Using workflows in share point 2010
 

Kürzlich hochgeladen

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Kürzlich hochgeladen (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Spsnyc 2014 o365 power shell csom

  • 1.
  • 2. THANK YOU EVENT SPONSORS • Please visit them and inquire about their products & services • To win prizes make sure to get your bingo card stamped by ALL sponsors
  • 3. 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
  • 4. Self Promotion  Microsoft Community Contributor (MCC) Senior SharePoint Consultant @amitvasuMCP – SP 2013 BLOG – www.amitvasu.com/blog SharePoint Saturday Toronto
  • 5. Agenda PowerShell + CSOM Background and CSOM Overview How to Start DEMO Final Thoughts Why PowerShell + CSOM Q/A SharePoint Saturday Toronto Agenda
  • 6. “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 Toronto
  • 7. Typical CT deployment process SharePoint Saturday Toronto
  • 8. What is being recommended SharePoint Saturday Toronto
  • 9. 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 Toronto
  • 10.
  • 11. CSOM Overview  Client side library for remotely communicating with SharePoint  Introduced in SharePoint 2010  Expanded upon in SharePoint 2013 SharePoint Saturday Toronto CSOM Overview
  • 12. How CSOM Works SharePoint Saturday Toronto
  • 13. How CSOM Works –SP 2013  SharePoint 2013 SharePoint Saturday Toronto
  • 14. 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 Toronto
  • 15.
  • 16. Steps to start developing  Pick your Development environment  Local Machine  SharePoint 2013 Environment SharePoint Saturday Toronto
  • 17. 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 Toronto
  • 18. SharePoint Environment  No need to do anything other than referencing DLLs from ISAPI folder. SharePoint Saturday Toronto
  • 19. 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 Toronto
  • 20.
  • 21. 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 Toronto
  • 22. 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 Toronto
  • 23. 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 Toronto
  • 24.
  • 25.
  • 26. 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 Toronto
  • 27.
  • 28. 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 Toronto
  • 29.
  • 30. THANK YOU EVENT SPONSORS • Please visit them and inquire about their products & services • To win prizes make sure to get your bingo card stamped by ALL sponsors