Powershell vs. Perl

djfunzdjfunz Member Posts: 307
So I was speaking with a co-worker today and we were having a conversation about scripting and how important it is for the Systems Admin. As you all may know, I'm a noob in the field and am continuing to learn every day. My colleague is of the opinion that Perl is a great starting language because it's able to be used across different platforms and once one learns Perl it's easy to learn PowerShell. Another co-worker is of the opinion that I should start with PowerShell because it's not as difficult and we're working directly with Server 2008 R2.

What are the opinions of some of the experienced TechExams members here?
WGU Progress - B.S. IT - Completed

Comments

  • ipSpaceipSpace Member Posts: 147
    I like Python.
    In my opinion is better than Perl.

    Do not know a lot about PowerShell, but if you are working mostly with Windows Servers, then PowerShell is your best choice.

    If you work with linux/networking equipment Python would come in handy .

    My Network & Security Blog with a focus on Fortigate. New post on how to create a fortigate ssl vpn.
  • RobertKaucherRobertKaucher Member Posts: 4,298
    There is no reason to learn Perl if you will be working mostly with Windows systems.

    If you are or are going to be a Windows admin you NEED to know PowerShell. No Windows admin who is aware of the direction that MS is taking both the OS and enterprise server applications (SharePoint, SQL Server, Exchange) could ever deny that PoSh is a requirement for a good Windows admin. Notice what I said - a REQUIREMENT - I did not say "a nice to have."

    I'm not saying that you need to be a PowerShell guru. But all Windows admins need to know the basics and feel comfortable using the shell interactively, not just scripting.
  • RobertKaucherRobertKaucher Member Posts: 4,298
    Just as an example. On my team I have a new admin who is learning the ropes of SharePoint. He was an electrical engineer who worked in QA and other areas of our business. So he is an IT n00b but he knows the business processes of our company like the back of his hand. He was porting some SharePoint Designer workflows he created on a dev site to production but he needed the GUIDs of the lists and libraries on the production site. So what's the only way to get those? PowerShell! You could use another .NET language like C# but PoSh is the easiest. Of course he comes to me because he has no idea how to do it. When my boss, who is not a fulltime manager but is also an admin, needs to know which user accounts in a specific OU have not logged into their accounts in more than 30 days he comes to me. It would take him 10 seconds to type the PowerShell command himself. But he has not learned PoSh yet... If I need to add a new account to SQL Server or AD I do it via PoSh as it's just easier now that I have a few functions set up. It takes me just a few seconds and it takes at least that for DSA.msc or SSMS just to open!
  • MishraMishra Member Posts: 2,468 ■■■■□□□□□□
    Having learned PERL before Powershell, it made learning Powershell a LOT easier.

    PERL books focus on straight scripting, and not really much on features. This makes it a good book to focus on your scripting from a blank page skills.

    Powershell books like to put a lot of information in your lap and have you figure it out even though you could be really new to to scripting.

    If you really have a lot of time, learn PERL for the basics on scripting. Then jump into Powershell. I wouldn't recommend this to most people just because of the extra time sync. But I think it is worth it if you do have time.
    My blog http://www.calegp.com

    You may learn something!
  • djfunzdjfunz Member Posts: 307
    I have no doubt that learning these languages is important and can save loads of time and make things easier but if Perl is basically backwards compatible to work on Windows systems but has the functionality to operate very well in a Linux environment then I don't need to really learn PowerShell right? At least not in the beginning. This is where I'm confused. Is it realistic as a beginner to start with Perl or should a beginner start with PowerShell and learn Perl at a later time. Plus one has to account with available resources. TrainSignal just released a course which gives beginners a good review of PowerShell. I just see reading material for Perl and I don't have the attention span to read an entire book as quick as I could view and understand videos.

    I'm still leaning towards PowerShell though.
    WGU Progress - B.S. IT - Completed
  • MishraMishra Member Posts: 2,468 ■■■■□□□□□□
    djfunz wrote: »
    I have no doubt that learning these languages is important and can save loads of time and make things easier but if Perl is basically backwards compatible to work on Windows systems but has the functionality to operate very well in a Linux environment then I don't need to really learn PowerShell right? At least not in the beginning. This is where I'm confused. Is it realistic as a beginner to start with Perl or should a beginner start with PowerShell and learn Perl at a later time. Plus one has to account with available resources. TrainSignal just released a course which gives beginners a good review of PowerShell. I just see reading material for Perl and I don't have the attention span to read an entire book as quick as I could view and understand videos.

    I'm still leaning towards PowerShell though.

    PERL has to be installed in a Windows environment. Most environments (that I've been in) don't have it installed. Windows scripting always revolves around Batch, VBScript, and now Powershell.

    If you want to be a pure Windows admin and don't have great attention span, then just learn Powershell. If you want to be a Windows and Linux admin, learn the basics of PERL first.
    My blog http://www.calegp.com

    You may learn something!
  • RobertKaucherRobertKaucher Member Posts: 4,298
    Mishra wrote: »
    PERL has to be installed in a Windows environment. Most environments (that I've been in) don't have it installed. Windows scripting always revolves around Batch, VBScript, and now Powershell.

    If you want to be a pure Windows admin and don't have great attention span, then just learn Powershell. If you want to be a Windows and Linux admin, learn the basics of PERL first.

    I disagree with this unless your primary focus is going to be on Linux. Say 50% or greater emphasis on Linux. I learned Perl back in the early 2000s and I've recently been reading the updated versions of the books I used back then. I really don't think it matters which one you learn first. They are so very different except in very superficial ways that it just does not matter.

    For someone who is a Windows admin that runs a few Linux boxes (maybe LAMP) it would be nearly useless. Don't get me wrong. I love Perl - It's installed on my home laptop but I use it only for running examples from the books I'm going through. I have 3 Linux boxes I run at work and I have no reason at all to use Perl with them. Being limited in my brain capacity I have to say PoSh is far more practical in my role.

    If you are a Windows admin you will likely never use Perl in the real world. PowerShell is now integrated into EVERYTHING since Exchange 2007. I really think telling someone to learn Perl or C# first because it will make learning PoSh easier is like telling someone "You should really learn Latin first because it will make learning Spanish easier." That's just not practical. The amount of time spent learning Perl combined with the lack of practical application for a mostly Windows guy would just completely out weigh any benefit of the potential carry over because the carry over is mostly abstract concepts that would be learned while studying PoSh anyway.
  • ZartanasaurusZartanasaurus Member Posts: 2,008
    I know next to nothing about Perl, but from looking at code examples compared to Python, Perl looks way less intuitive.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • it_consultantit_consultant Member Posts: 1,903
    2nd for powershell. Windows has MS specific cmdlets that you will need to be familiar with using so you might has well jump head first. MS has never been awesome about teaching logic with their scripting which is why people who come from a perl background find the shell easy. It was designed, IMHO, to attract UNIX admins. That doesn't mean that it makes total sense to learn UNIX scripting languages in order to better learn powershell.
  • higherhohigherho Member Posts: 882
    What type of documents / books would you guys recommend for an individual who is a powershell noob? For example, I understand basics in bash but when it comes to powershell I do not icon_sad.gif I do like the fact that I can use a majority of unix commands in powershell and having the man pages on a windows box is quite useful.
  • demonfurbiedemonfurbie Member Posts: 1,819
    powershell always reminded me of making .bat files on my old dos computer

    if all you do is windows learn powershell if not learn perl
    wgu undergrad: done ... woot!!
    WGU MS IT Management: done ... double woot :cheers:
  • DevilsbaneDevilsbane Member Posts: 4,212 ■■■■■■■■□□
    Mishra wrote: »
    If you want to be a Windows and Linux admin, learn the basics of PERL first.

    This is like saying if you want to learn Spanish you should learn Latin first. Will it make learning Spanish easier? It should. But it is a roundabout way that is going to take more time and energy. It isn't necessarily wrong, if you have a use for PERL or just want that knowledge then go for it. But I wouldn't plan to learn something that I never intend to use.
    Decide what to be and go be it.
  • MishraMishra Member Posts: 2,468 ■■■■□□□□□□
    I disagree with this unless your primary focus is going to be on Linux. Say 50% or greater emphasis on Linux. I learned Perl back in the early 2000s and I've recently been reading the updated versions of the books I used back then. I really don't think it matters which one you learn first. They are so very different except in very superficial ways that it just does not matter.

    The book I used to learn the basics of PERL was great. And it only takes 1-3 days to browse around the book and learn some basics. It's better than any Powershell book I've seen to learn the VERY basics of scripting. (ignore the CGI parts)

    Amazon.com: Perl and CGI for the World Wide Web, Second Edition (9780201735680): Elizabeth Castro: Books

    Every time I'm actually scripting a real script (not just get-service) I remember PERL a lot and I barely did anything with it. Maybe the difference is that a lot of Powershell I've done is longer extensive scripts which includes ifs/while/until/for/for each and so forth. Not just many of the same commands over and over again (which don't use control strucutures). These are the things I think you can learn better using the book above for PERL than Powershell.

    This has just been my experience.
    My blog http://www.calegp.com

    You may learn something!
  • MishraMishra Member Posts: 2,468 ■■■■□□□□□□
    Devilsbane wrote: »
    This is like saying if you want to learn Spanish you should learn Latin first. Will it make learning Spanish easier? It should. But it is a roundabout way that is going to take more time and energy. It isn't necessarily wrong, if you have a use for PERL or just want that knowledge then go for it. But I wouldn't plan to learn something that I never intend to use.

    Yes, if you aren't going to use PERL or Linux then don't even get into it. I suggested that.
    My blog http://www.calegp.com

    You may learn something!
  • HypntickHypntick Member Posts: 1,451 ■■■■■■□□□□
    higherho wrote: »
    What type of documents / books would you guys recommend for an individual who is a powershell noob? For example, I understand basics in bash but when it comes to powershell I do not icon_sad.gif I do like the fact that I can use a majority of unix commands in powershell and having the man pages on a windows box is quite useful.

    This is what i'm reading right now. Amazon.com: Learn Windows PowerShell in a Month of Lunches (9781617290213): Don Jones: Books
    WGU BS:IT Completed June 30th 2012.
    WGU MS:ISA Completed October 30th 2013.
  • ZartanasaurusZartanasaurus Member Posts: 2,008
    higherho wrote: »
    What type of documents / books would you guys recommend for an individual who is a powershell noob?

    Learn Powershell in a month of lunches is a great intro book.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • ZartanasaurusZartanasaurus Member Posts: 2,008
    powershell always reminded me of making .bat files on my old dos computer

    Not really.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • DevilsbaneDevilsbane Member Posts: 4,212 ■■■■■■■■□□
  • djfunzdjfunz Member Posts: 307
    Linux is definitely something I want to get into down the road, but we aren't using Linux really at my current job. We're currently switching over from Novell to AD and I'm thinking PowerShell would be used more since it's incorporated right into Server 2008. Perl is something I would have to install stuff for to have compatibility with Windows and it may work just as well but something just gives me the feeling that PowerShell would be better for a beginner who has basically no scripting knowledge whatsoever. I could be completely wrong here though. I think I'm gonna give PowerShell a go and see how far I can get with it. Of course all of this is coming at once since I don't even have any AD experience. It's just good to go in with a learning plan. I'm watching some AD videos right now and I'm going to pick up the "Learn Windows PowerShell in a Month of Lunches" book so thanks for the suggestion. icon_study.gif
    WGU Progress - B.S. IT - Completed
  • RobertKaucherRobertKaucher Member Posts: 4,298
    djfunz wrote: »
    Linux is definitely something I want to get into down the road, but we aren't using Linux really at my current job. We're currently switching over from Novell to AD and I'm thinking PowerShell would be used more since it's incorporated right into Server 2008. Perl is something I would have to install stuff for to have compatibility with Windows and it may work just as well but something just gives me the feeling that PowerShell would be better for a beginner who has basically no scripting knowledge whatsoever. I could be completely wrong here though. I think I'm gonna give PowerShell a go and see how far I can get with it. Of course all of this is coming at once since I don't even have any AD experience. It's just good to go in with a learning plan. I'm watching some AD videos right now and I'm going to pick up the "Learn Windows PowerShell in a Month of Lunches" book so thanks for the suggestion. icon_study.gif

    One issue I have had with a Perl background, and this includes other languages like C# or even JavaScript, is that I tend to be very wordy when writing PoSh scripts. PoSh is NOT just a scripting language. It is in many ways optimized for writing into the shell and if you have the baggage of writing wordy scripts behind you it might not help you "cruch the code" when you are using the shell.
Sign In or Register to comment.