Make-Shell 是否已弃用?
几年前,我使用 Make-shell 通过自定义 cmdlet 创建自定义 shell。 后来我使用了管理单元技术,我忘记了这个选项。
现在我应该向一大群客户部署一组自定义cmdlet,最好提供零配置解决方案;因此,我记得自定义 shell 解决方案,我想知道它是否仍然是这种情况下的最佳解决方案。这也会很有帮助,因为我的 cmdlet 使用 WF 4.0,因此 shell 应该在最新的框架版本下运行。 不管怎样,我有点担心它的支持:它仍然可以使用 Powershell 2.0 功能吗?
是否有其他方法可以在客户的计算机上轻松部署 cmdlet?
谢谢
A couple of years ago I used Make-shell to create custom shells with custom cmdlets.
Later I used snap-in technique and I forgot about that option.
Now I should deploy a set of custom cmdlets to a big set of customers, and it would be better to provide a zero-configuration solution; hence, I remembered the custom shell solution and I'm wondering if it is still the best solution in such scenario. It would be helpful also because my cmdlets use WF 4.0, so that the shell should run under latest framework version.
Anyway, I'm a bit scared about support for it: is it still working with Powershell 2.0 functionalities?
Are there alternative ways to easily deploy cmdlets on customers' machines?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 PowerShell V2 中,替代方案是模块。
您可以编写脚本模块、二进制文件模块、清单模块。部署简单。 它们通过简单的目录副本进行部署。理论上可以在环境变量 PSModulePath 中写入的路径中在网络上共享。
根据 此 StackOverflow 条目,PowerShell(引擎)在 .NET 4.0 下运行良好。
Make-shell 不再提供使用PowerShell,安装Windows SDK就可以找到它。 本文将其视为已弃用。但我无法在 Microsoft 网站上找到该信息。
In PowerShell V2 the alternative are modules.
You can write script modules, binaries modules, manifest modules. Simple to deploy. They are deployed by a simple directory copy. And theoretically may be shared on the Network in a path writen in the environement variable
PSModulePath
.According to this StackOverflow entry PowerShell (the engine) runs fine under .NET 4.0.
Make-shell is no longer provided with PowerShell, you can find it if you install the Windows SDK. This article present it as deprecated. But I'am not able to find the information on Microsoft site.
当您可以创建自己的称为主机的 PowerShell“shell”时,不知道为什么要使用 makeshell。您见过 Joel Bennet 的 PoshConsole 使用 .NET 4 吗?
http://poshconsole.codeplex.com/
也就是说,如果你真的想使用 makeshell,我有更新的博客文章,我什至用它构建了一个新的 sqlps 主机
http://sev17.com/2010/05/the-truth-about-sqlps-and-powershell-v2/
Not sure why you would use makeshell when you can create your own PowerShell "shell" called a host. Have you seen Joel Bennet's PoshConsole which uses .NET 4?
http://poshconsole.codeplex.com/
That said if you really want to use makeshell, I have more recent blog post where I built a new sqlps host with it even
http://sev17.com/2010/05/the-truth-about-sqlps-and-powershell-v2/