Azure上的PnP脚本 [英] PnP Script on Azure

查看:135
本文介绍了Azure上的PnP脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,


我是Azure的新手,正在努力弄清楚如何连续运行PnP脚本作为后端进程。我想知道两件事。


1)托管可以安排连续运行的SPO PnP脚本的各种服务有哪些?我在WebJob中尝试过,但它无法找到pnP程序集。它抛出错误Connect-PnPOnline无法识别。我使用
在根目录下的Kudu工具上传模块,但仍无用。


2)我在哪里上传SPO PnP模块,比如我是否正在使用WebJob。


3)我无法找到该选项在Azure功能上运行PowerShell。新的azure界面似乎与许多文章不同,它们说我们可以使用Custom Function创建。我根本没有得到这个选项。



谢谢


Aniruddha



解决方案

你好aniruddha,


1。 PnP PowerShell只需从此处安装PowerShell模块:


https://github.com/SharePoint/PnP-PowerShell/releases


2。将PnP上传到文件夹"D:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ social.msdn.microsoft.com/Forums/getfile/1364507"> 


运行PnP PowerShell并按预期工作:

写入 - 输出"PowerShell定时器触发函数在以下位置执行:


(get-date)";


parentsitename =" https: //xxx.sharepoint.com/sites/xxx"

Hi Team,

I am new to Azure and struggling to figure out how to run a PnP script continuously as a backend process. I would like to know two things.

1) What are the various services to host a SPO PnP script that can be scheduled to run continuously? I tried it in WebJob but it's not able to find the pnP Assemblies. It throws error Connect-PnPOnline is not recognized. I uploaded the module using the Kudu tool under the root but still of no use.

2) Where Do I upload the SPO PnP module, say if I am using WebJob.

3) I am not able to find the option to run PowerShell on Azure functions. The new azure interface seems different from many articles where it says we can create using Custom Function. I am not getting that option at all.

Thanks

Aniruddha

解决方案

Hi aniruddha,

1. PnP PowerShell only needs to install the PowerShell Module from here:

https://github.com/SharePoint/PnP-PowerShell/releases

2. Upload PnP into the folder "D:\home\site\wwwroot\functionname\Modules":

 

Run PnP PowerShell and work as expected:

Write-Output "PowerShell Timer trigger function executed at:


(get-date)";


parentsitename="https://xxx.sharepoint.com/sites/xxx"


这篇关于Azure上的PnP脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆