Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

coming from bash, what windows scripting language to learn?

For work I am moving over to windows after being on linux for quite a while. I want to get some scripting skills going for administrative tasks in windows. I am quite good with bash, but bash's "libraries/tools" are missing a lot when it comes to windows. I see vbscript, wsh, powershell, cmd, jscript, etc and wondering what to learn, or what combination of things. I'm also learning .net so it might be nice if it helps with that, but its not a requirement.

like image 672
Ian Kelling Avatar asked Jun 23 '09 00:06

Ian Kelling


People also ask

Should I learn bash or PowerShell?

Broadly speaking if you want to work with Linux/Unix systems learn Bash and if you want to work with Windows learn PowerShell. As you can now use both in either ecosystem that's not such a hard split anymore though it is still relatively true.

Which scripting language should I learn first?

Python is always recommended if you're looking for an easy and even fun programming language to learn first. Rather than having to jump into strict syntax rules, Python reads like English and is simple to understand for someone who's new to programming.


2 Answers

If you are learning .NET, Powershell is the only choice. VBScript has been around for much longer, and so there are probably more examples and samples out there for VBScript. But Powershell is where Microsoft is focusing for scripting for the future. It is included in WS2008 (R2), it will be in Win 7, and it can be added on to Vista or WS2003 or WS2008. Powershell is strategic. I find it much more powerful than VBScript.

The community around Powershell is ramping up, too. Just one example: If you go to powershell.com you can sign up for a "powershell tip of the day" sent in email.

As for .NET intersection - Powershell can load .NET assemblies and call into them, so the two things will be very complementary.

like image 155
Cheeso Avatar answered Nov 12 '22 08:11

Cheeso


Powershell, no question about it if you're going to be administering a 2008 environment or later. I frequent Microsoft conferences and they are putting all their chips into Powershell.

like image 35
Eric Avatar answered Nov 12 '22 08:11

Eric