SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Mais de 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
 

Último

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Último (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

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