将Powershell脚本转换为客户端代码所需的指导 [英] Guidance needed to convert powershell scripts to client side code

查看:85
本文介绍了将Powershell脚本转换为客户端代码所需的指导的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

对于某些项目特定的每周工作,我们在SharePoint 2010上运行许多powershell脚本.

We have many powershell scripts running on SharePoint 2010 for some project specific weekly job basis.

-我们正在将SP 2010应用程序迁移到SP 2016环境.

-We are migrating the SP 2010 application to SP 2016 environment.

-新的SP 2016服务器场将仅允许使用PHA/CSOM代码标准.

-The new SP 2016 farm will only allow PHA/CSOM code standard.

-在当前应用程序中,某些PowerShell脚本可用于某些常规任务,例如每周/每天的工作(Windows任务计划程序将执行这些脚本).

-In current application some PowerShell scripts are available for some regular tasks as weekly/Daily jobs (windows task scheduler executes those scripts).

-请让我们知道将Powershell脚本转换为控制台应用程序的方法(仅CSS代码),以便我们可以将这些控制台作业放置在SP 2016 PHA服务器上,并可以由任务管理器以相同的方式进行调度.

-Please let know the ways to convert Powershell scripts to Console Applications (csom code only) so that we can place these console jobs on SP 2016 PHA server and can schedule by task manager in same way.

非常感谢

sudhanshu sharma做得好,扔进河里:)

sudhanshu sharma Do good and cast it into river :)

推荐答案

由于要摆脱PS,因此可以将现有的PS逻辑转换为CSOM. Microsoft.SharePoint.PowerShell Microsoft. SharePoint.Client.dll .

Since you want to get rid of PS, you can convert the existing PS logic into CSOM . The Microsoft.SharePoint.PowerShell has equivalent operations in Microsoft. SharePoint.Client.dll.

您可以从下面的电子书中获取详细的CSOM代码实现和操作.它有详细的演示

You can get the detailed CSOM code implementation and operations from the below E-Book. It has detailed demos

SharePoint CSOM代码电子书

您还可以参考详细的

You can also refer the detailed TechNet CSOM wiki

一旦开发了CSOM控制台应用程序,就可以将其放置在远程服务器中,并像在当前环境中一样调度它.

Once you have developed the CSOM console app, you can place it in your remote server and schedule it like you are doing in your current environment.

此致

Priyan


这篇关于将Powershell脚本转换为客户端代码所需的指导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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