在不安装 PowerShell 的情况下运行 PowerShell 脚本? [英] Run PowerShell scripts without installing PowerShell?

查看:77
本文介绍了在不安装 PowerShell 的情况下运行 PowerShell 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法捆绑 PowerShell,这样我就不必在操作系统上安装它?理想情况下,我想在我的构建过程中使用它,但我想要一些独立的东西;我不想依赖于安装 PowerShell 的每台客户端计算机.我想我会构建一个控制台应用程序来托管 PowerShell 环境,但在本地捆绑 PowerShell 程序集.

Is there a way to bundle PowerShell such that I don't have to install it on the OS? Ideally I'd like to use it in my build process, but I want something that's self-contained; I don't want to rely on each client computer installing PowerShell. I'm thinking I'd build a console app that hosts a PowerShell environment, but bundles the PowerShell assemblies locally.

假设有可能,这样的设置是否存在版税/许可问题?

Assuming it's possible, are there any royalty/licensing issues with such a setup?

推荐答案

我不确定我需要花多少时间才能查看是否可以在某种程度上独立复制这些库.您希望机器上安装 .NET Framework 2.0?

I'm not sure how much time I'll have to be able to see if the libraries can be somewhat independently copied. You are expecting the .NET Framework 2.0 to be on the machine?

这里有一些信息:http://karlprosser.com/coder/2008/06/19/portable-powershell-part-2-roll-your-own-plus-a-challenge/

但这不是微软官方支持的.Microsoft 的立场可能是您必须使用 msi/msu 安装 PowerShell 或添加该功能.

But this isn't officially supported by Microsoft. Microsoft's stance will likely be that you must install PowerShell with the msi/msu or add the feature.

这篇关于在不安装 PowerShell 的情况下运行 PowerShell 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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