Is there a decent command line parser for powershe

2019-08-08 14:11发布

问题:

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.

Thanks

回答1:

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.