Powershell – The Only way to script? Not always

Powershell

I suspect there are going to be die hard users out ready to leap on me when I utter this statement.

“Powershell should not your only scripting tool…”

I have peers, people I look up to me that will say “WHAT?! Are you out of your mind?!”

But honestly, depending on what your day to day tasks are, I think you should be comfortable in scripting in all languages.   And use the language that best suits the scenario in question.

For example.   Although I dearly love Powershell, there are situations where it is just OVERKILL to setup a Powershell script to do the job.

Yes, you could (if you prepared your environment OR had a pure Server 2008R2 / Windows 7 setup) use Powershell to run a login script.  That’s pretty cool actually but it’s a bit overkill if the only purpose you need is to map a few Drive shares in a small office and set the time on workstations.  And to be honest, Group Policy with Client side preferences might make more sense. 

There are many tasks that have VBscript’s already handily pre-written.  Like in NTBACKUP (which is still widely used) there are simple VBscripts to send out and compose an email.   In fact if you’re working in Forefront Identity Manager 2010 (or Identity Lifecycle Manager) you’ll find the software generates a lot of your code to be scheduled in VBscript.   Why rewrite that JUST to have Powershell?  I think it’s fun to do, but the whole point is to be MORE PRODUCTIVE!

But there are situations where Powershell is absolutely needed.   Manipulation of objects in Active Directory, more complex techniques that VBscript just can’t touch and direct automation from current products.  Powershell absolutely floors everything in that category.

I guess my statement is simple.  If you love Powershell and it makes you more productive, USE IT!  But don’t shun existing solutions because the “latest and greatest” is here.   Just as you wouldn’t invest in a $50,000 coffee machine for a single cup (UNLESS YOU REALLY LIKE COFFEE or you’re running a coffee shop it makes sense for the volume of use), you shouldn’t ignore “Good old CMD.EXE” or “Faithful vbScript” for some of the simpler things in life.   Powershell is a tool in your kit enabling you to do more.  It is not the only tool. 

Synergy of technology can produce the greatest results.  Use what you are most comfortable with, but learn more to strengthen your skills.

Sean
The Energized Tech

One Reply to “Powershell – The Only way to script? Not always”

  1. I agree I was just watching a video of snover and he basically said the same thing. He said when should I use Powershell well if you have vbs that works and does the job then don’t spend time going and converting to PS just to have PS because that is not very productive but if the code needs to be totally re-factored and PS can do it easier then use PS. I use lot of Languages to get my jobs done including Python, Boo, Batch, VB, PS, etc. you gotta use the right tool for the job. p.s. enjoy you tweets keep it up. Good Times and Get-Command

Leave a Reply