简体   繁体   English

使用Webform在客户端运行Powershell脚本

[英]Use webform to run powershell script on client side

I'm trying to build a webform using C# that will run a powershell script on the client side then return the results back to the webform. 我正在尝试使用C#构建Web表单,该Web表单将在客户端运行Powershell脚本,然后将结果返回到Web表单。 The reason I wish to do this is because for me to able to successfully run the powershell script is to be able to use firewall authentication which doesn't have an API and needs actual human intervention to type user and password therefore i can't do everything on the server side. 我希望这样做的原因是因为对我而言,能够成功运行powershell脚本的原因是能够使用没有API且需要实际人工干预以键入用户名和密码的防火墙身份验证,因此我无法执行服务器端的所有内容。

overall, i want to leave the script on the server, but be able to 'send' the script and execute it from within client pc, then returning the values back to the server to populate the webform 总体而言,我想将脚本保留在服务器上,但能够“发送”脚本并在客户端PC中执行该脚本,然后将值返回给服务器以填充Web表单

You have to write java applet or ActiveX. 您必须编写Java applet或ActiveX。 In it you run powershell script and pass data to form using JavaScript. 在其中运行powershell脚本,并使用JavaScript将数据传递到表单。 But you have to read about security, collecting data for selected technology. 但是您必须阅读有关安全性的信息,并为选定的技术收集数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM