views:

151

answers:

3

This is more a general question than anything. I know that VBScript and Powershell can do a lot of the same things and each does things the other can't, but I'm wondering if there's any reason to still learn VBScript or if efforts are best directed into learning Powershell.

/matt

+6  A: 

If you spend most of your time in the .Net world and don't have to maintain / use any code basis which exist primarirly in VBScript, I would focus on PowerShell. It's a great product and using it will only help increase your familiarity with the .Net framework and environment.

JaredPar
+2  A: 

There are areas where you don't have PowerShell support like in WinPE (pre-execution environment). I believe there still is an issue with trying to use PowerShell scripts as a Windows logon script whereas you can easily use a VBScript file. Other than reasons of "availablity", I would go with PowerShell - very capable script language and you can use all that scripting knowledge you gain right from the shell i.e. interactively.

Keith Hill
+2  A: 

That all depends an what you do or need to do. PowerShell for example is only included in Windows 7 and later, while VBScript is supported all the way back to Windows 98. So if you have to write a script that has to run on a bunch of legacy XP machines, you're very likely out of luck with PowerShell. It's also a reason why having some batch file knowledge can't hurt. Since cmd is available on any Windows (not WinDOS) machine out there.

That being said, by now PowerShell is my scripting language of choice, even though the performance could be better (something I sadly notice when trying to solve Project Euler problems with it). In my internship currently we're developing with C# and having some of the utility functions lying around as PowerShell functions is very helpful. And translating them from C# to PowerShell is trivial.

Joey
Matt Dewey
Yes, it's possible, but not the default configuration which does hinder deployment at times. It may, or may not be an issue, that's why I said it depends :-)
Joey