Powershell是否有一个不错的命令行解析器? [英] Is there a decent command line parser for powershell?

查看:98
本文介绍了Powershell是否有一个不错的命令行解析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯了NDesk.Options,我发现它既简单又强大。但是在尝试在Powershell中对其进行编码之前,我想知道是否已经内置了某些东西。

I am used to NDesk.Options, which I find both simple and powerful. But before trying to code against it in powershell I am wondering whether there is something already built in.

谢谢

推荐答案

不确定要理解您的问题,但就解析脚本或函数参数而言,您已经将 param 键盘作为请在 about_Parameters about_Functions_Advanced about_Functions_Advanced_Parameters 。这样您就可以为参数指定不同的限制。

Not sure to understand your question but as far as you want to parse script or function parameters you've got the param keywork as discribe in about_Parameters, about_Functions_Advanced, about_Functions_Advanced_Parameters. This will allow you to specify different restriction for parameters.

这篇关于Powershell是否有一个不错的命令行解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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