VBS vs PowerShell:哪个更轻? [英] VBS vs PowerShell: Which is lighter?

查看:456
本文介绍了VBS vs PowerShell:哪个更轻?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我需要在系统上花费最少精力来执行的脚本,我会选择哪个?

If I need a script that executes with minimum effort from the system, which would I choose?

通过在任务管理器中查看流程:

By looking at processes at Task Manager:

内存(专用工作集)
wscript.exe 2,068K
powershell.exe 33,144K

Memory (Private Working Set)
wscript.exe 2,068K
powershell.exe 33,144K

谢谢.

推荐答案

此处保留了工作原理.如果机器工作量少,那么您就必须做更多的工作.如果机器可以完成更多工作,则您只需要做更少的工作即可.

There is a conservation of work principal going on here. If the machine does less work, then you have to do more work. If the machine does more work, you have to do less work.

我们使用PowerShell的理念是,最重要的资源是管理员的时间和精力,因此我们花费机器资源来提供最佳体验.因此,如果您正在寻找机器上尽可能小的重量,则应将其编码为"C". C ++比其中更重,VBS甚至更重,C#甚至更重,并且它们比PowerShell更轻.当然,与PowerShell相比,每个人还需要更多的精力来产生解决方案.

Our philosophy with PowerShell was that the most important resource was the Admin's time and attention so we spend machine resources to deliver the best possible experience. So if you are looking for the lightest possible footprint on the machine, you should code it in 'C'. C++ is heavier than that and VBS is even heavier, and C# is even heavier, and they are lighter than PowerShell. Of course each one also requires more effort to produce a solution than PowerShell.

因此,最终,您要做的是连续进行选择,而您需要做的就是确定什么是解决当前问题的正确工具.我们了解,从一开始就设计PowerShell来为C#=> C ++ => C提供顺畅的滑行路径.这使您可以从PowerShell开始,如果它太重,则可以过渡到另一种语言而不必重新开始.从头开始,就像使用PERL => C一样.

So the end of the day, what you end up with is a continuum of choices and what you need to do is decide what is the right tool for the problem at hand. We understood that from the beginning so we designed PowerShell to provide a smooth glide path to C# => C++ => C. This allows you to start with PowerShell and if it is too heavy, you can transition to another language without having to start over from scratch like you do with PERL => C.

这篇关于VBS vs PowerShell:哪个更轻?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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