用于启动PowerShell文件的按钮 [英] Button to start a PowerShell file
问题描述
亲爱的专家,
我一直在网上冲浪,论坛试图找出一种简单的方法,所以我可以在SharePoint网站上创建一个按钮,运行一个Powershell文件。
I have been surfing the net and forums trying to figure out a simple way, so I can create on a SharePoint Site a button, to run a Powershell file.
这个想法是,对计算机了解不多的用户可以访问SharePoint,按下按钮,在后台,powershell正在为他们执行任务。
The idea is, that users with little computer understanding, can go onto SharePoint, press a button and in the background, the powershell is doing a task for them.
遗憾的是,我对SharePoint,JavaScript或HTML没有很多经验。是否有可能这样做,或者可能有解决方法来达到目标?
I have unfortunately not a lot of experience with either SharePoint or JavaScript or HTML. Is there even a possibility to do so, or maybe with a workaround, to reach that target?
非常感谢,
Mike
推荐答案
嗨Mike,
我能想到的唯一方法就是创建一个自定义WebPart。然后添加一个简单的按钮Handler来执行给定的代码来激活PowerShell脚本。您可以参考以下文章获取更多信息:
The only way that I can thought is to create a Custom WebPart. Then add a simple button Handler to execute the under given code to fire your PowerShell script. You can refer to below article for more information:
https://sharepoint.stackexchange.com/questions/105905/run-powershell-script-from-sharepoint-page
您还可以查看本文是否对您有用:
致以诚挚的问候,
Allen Bai
Allen Bai
这篇关于用于启动PowerShell文件的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!