Tuesday, June 5, 2018

How does Powershell script connect to SharePoint OnPrem?

**some notes from Powershell setup and connectivity**

How will the PS script connect to SP?or
how I can access the PowerShell cmdlets from my client pc?

Everything I read assumes you're in front of the actual server. Is there anything like an RSAT module I can install on my client PC?

https://sharepoint.stackexchange.com/questions/101038/how-do-i-install-the-2013-sharepoint-powershell-module-on-my-windows-7-client-co

PS vs JS vs CS : Different Ways To Add Item In SharePoint 2013 List


https://www.c-sharpcorner.com/UploadFile/sagarp/different-ways-to-add-item-in-sharepoint-2013-list/


1) remote ps


PowerShell REMOTELY (not directly on the server)
  On the SharePoint Servers:
Log onto the SharePoint Server(s) as the SharePoint Administrator

2) csom


https://social.technet.microsoft.com/wiki/contents/articles/29518.csom-sharepoint-powershell-reference-and-example-codes.aspx

rest: https://blog.vgrem.com/2014/04/15/consuming-the-sharepoint-2013-rest-api-from-powershell/

PowerShell and the Client Object Model to write code against SharePoint Online. It can be a little intimidating at first, given the complexity of the work required.


3) PnP


https://sharepoint.stackexchange.com/questions/101038/how-do-i-install-the-2013-sharepoint-powershell-module-on-my-windows-7-client-co/101042

https://stackoverflow.com/questions/43510867/how-to-connect-to-sharepoint-2013-on-premise-using-csom-in-powershell?rq=1

SharePoint Patterns and Practices (PnP) contains a library of PowerShell commands (PnP PowerShell) that allows you to perform complex provisioning and artifact management actions towards SharePoint. The commands use CSOM and can work against both SharePoint Online and SharePoint On-Premises. The advantage is code you have written can be simply replaced with one single commandlet.

No comments:

Post a Comment