-
I want to recreate on a .Net console app several PowerShell scripts I have. While the PnP.PowerShell module is quite complete and straight forward. PnP Code SDK seems I have to recreate many things that are already done in the PowerShell module. I'm not sure if I'm looking at the right module here for what I need. The intention of doing this rather than sharing PowerShell scripts is to avoid asking user to use PS and install modules they don't know, which they are not familiar. Is this the correct package I should use for my purpose? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@Barbarur : PnP PowerShell under the cover uses PnP Core SDK (this package), PnP Framework combined with a lot of other code that calls into SharePoint and Teams using SharePoint CSOM/REST and Microsoft Graph API calls. So it's possible to replace a PnP PowerShell script with a console application, how easy that is depends a lot on the which cmdlets the script that you're replacing was using. |
Beta Was this translation helpful? Give feedback.
-
@jansenbe, as complete Sharepont freshman, I was a bit puzzled of all the libraries and the best way to set things up. Our goal is to connect from a .NET Framework 4.8 Windows service app. So far, I guess I just have to throw in a .NET Standard 2.0 component to make the ShP connection with and pass the ClientContext to the f4.8. I ran by the Microsoft.SharePointOnline.CSOM - and the PnP.Framework libraries in search of an authentication method that takes these four arguments. No luck there. After reading your comment here, I understand that the powerscript connection we're succeeding in, is based on the PnP.Core library. Your input will be most welcome as I done some diving already, the last few days ;-) |
Beta Was this translation helpful? Give feedback.
-
@bagoo-cm : please check the code in the application permissions polyglot sample (https://github.com/pnp/pnpcore/tree/dev/docs/polyglot). It uses a certificate that it reads from a certificate store on the machine. |
Beta Was this translation helpful? Give feedback.
@bagoo-cm : please check the code in the application permissions polyglot sample (https://github.com/pnp/pnpcore/tree/dev/docs/polyglot). It uses a certificate that it reads from a certificate store on the machine.