Solved

What is the difference between VBS and PowerShell?

Posted on 2011-02-13
4
1,087 Views
Last Modified: 2012-05-11
Hi,

Could someone can explain what is the difference between VBS and PowerShell? What is the advantages and disavantaged of each one for a Windows System Admin? If I want to learn one of them which will you recommand?
0
Comment
Question by:SAM2009
4 Comments
 
LVL 16

Assisted Solution

by:Dale Harris
Dale Harris earned 83 total points
ID: 34884002
Here's a great article on why you would choose Powershell over VBS and the advantages.

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_3296-The-Absolute-Beginner's-Guide-to-Powershell.html

And when you're done with that, and you want to know how it can benefit your life as a Server Administrator, you can check out this article:
http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/A_4327-PowerShell-Where-do-I-start.html

It goes into a little more depth of how you can unlock accounts very easily, reset passwords, and even create accounts.  Powershell is the future and it's the "Console" for Exchange 2007, Exchange 2010, and Sharepoint 2010.  It's definitely here to stay and made to improve upon VBS with a .Net flair.

HTH,

Dale Harris
0
 
LVL 13

Assisted Solution

by:connectex
connectex earned 83 total points
ID: 34885019
It depends on what you're trying to acomplish. Some older products don't support PowerShell. Since VBS was released first it's supported by most products (Exchange 2003 / SQL 2005). However the newer products are favoring PowerShell over VBS (Exchange 2007 / 2010, SQL 2008 / 2008 R2, SharePoint 2010) . In fact some Exchange functionality is only available via Powershell cmdlets. So unless you have the latest products you may be forced to learn some about VBS and PowerShell in order to do most automation. PowerShell 2.0, the latest, comes with Windows 7 and Server 2008 R2. There are downloads for installed it on Vista, XP, Server 2003 and 2008. VBS support is included with all supported versions of Windows.
0
 
LVL 70

Accepted Solution

by:
Chris Dent earned 84 total points
ID: 34886799
The differences are pretty vast.

VbScript is a difficult one for me to describe, it's a derivative of the Visual Basic programming language, and can make use of COM Objects, such as WScript.Network, WScript.Shell, ADSystemInfo, etc, etc. I believe it's popular for the reason Connectex mentions; it's available regardless of the version of Windows. VbScript was pretty much the language of choice for MS sys admins prior to PowerShell.

I have an easier time describing PowerShell. PowerShell is an Object-Oriented .NET Shell Scripting language. Because it is a .NET language it has an enormous range of native capabilities. PowerShell is the language of choice for almost all of the newer MS products. Most notably Exchange, but also Lync (successor to OCS) and quite a few others.

Personally I've abandoned VbScript in favour of PowerShell, no small change given that I have over 7 years experience with VbScript behind me. But 3 years into my PowerShell / .NET education there's no way you'd make me look back. PowerShell can do everything that VbScript can and a lot more besides.

Pros and cons... I can come up with a list, but it strikes me that MS are pushing PS hard and dropping VbScript and COM Object interfaces. As long as that is the case the choice is simple:

If you wish to script for newer MS systems (Exchange 2007+, MS Lync, SQL, SharePoint, etc, etc) you need to learn PowerShell.

I cannot advise anyone learns VbScript on that basis, but there are caveats, it does depend what you expect to do with the language. If you want to use it as a portal to VBA, then VbScript is a good choice. Or if you deal exclusively with legacy platforms VbScript is a good choice.

Of course, if you're capable of learning both, the both is a good choice too :)

Chris
0
 
LVL 1

Author Closing Comment

by:SAM2009
ID: 34903800
Thank you for all your advices.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A procedure for exporting installed hotfix details of remote computers using powershell
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now