Options

Why Admins Should Know How to Code

the_Grinchthe_Grinch Member Posts: 4,165 ■■■■■■■■■■
Decent article that sounds like another push towards devops!

Why admins should know how to code | Data Center - InfoWorld
WIP:
PHP
Kotlin
Intro to Discrete Math
Programming Languages
Work stuff

Comments

  • Options
    jamesp1983jamesp1983 Member Posts: 2,475 ■■■■□□□□□□
    It can definitely make your life a lot easier and make you more efficient.
    "Check both the destination and return path when a route fails." "Switches create a network. Routers connect networks."
  • Options
    lsud00dlsud00d Member Posts: 1,571
    I enjoyed this article, and the comments that followed. I have seen both sides of the fence (fixing a prod issue on the fly vs. an admin leaving and decoding their efforts) but from starting my linux journey a year ago, I know shell scripting is instrumental in my daily duties and where a canned product cannot do, I can typically code it icon_cheers.gif
  • Options
    higherhohigherho Member Posts: 882
    They should also post a topic stating "How programmers should know security and hardening with their software" . I agree that powershell and scripting can be very helpful to a system administrator and its not difficult to learn. However, most of the guys stuff that he says can already be done by automation tools (SCCM, HBSS (Mcafee e-policy orchestrator suite), Volume licensing center)). I'm not stating reasons why admin's should not learn it (powershell or VB) but I can sympothise with admins that dont want to when we already have available tools to perform the needed tasks. But if budget's are a concerns then yes again you would need to learn scripting at some point. Also, if I was working with linux then yes I would want to know scripting like the back of my hand.

    You know what Admins should also learn? Networking, CCNA level.
  • Options
    the_Grinchthe_Grinch Member Posts: 4,165 ■■■■■■■■■■
    Well I can say that knowing Powershell is really a God send. Everyone (the Powershell God!!!) helped me out a couple months ago with an issue that would have taken at least week, but with Powershell took about 15 minutes. One of our customers (complete 2008 environment) wanted to know every process running on every server using a none systems based account. The idea was they wanted to find out who's username it was running under and then change it to a system one in the event someone left. They had about 30 servers and since I was the night guy it fell to me. I knew there had to be a way to do it through Powershell and spent a few hours testing out scripts. Thankfully, with help from Everyone, he showed me how I could set it up to run from one server and query all the other ones. Then put the results in a spreadsheet, showing only the none system based processes. Ran the script and a few minutes later emailed it to the customer, along with the systems engineer. The customer (they had their own IT people as well) was stunned that it was completed so quickly and even our systems engineer couldn't believe it.
    WIP:
    PHP
    Kotlin
    Intro to Discrete Math
    Programming Languages
    Work stuff
  • Options
    undomielundomiel Member Posts: 2,818
    I definitely believe that scripting of some sort is a must have to move to the next level. I find way too many Windows admins out there with little to no scripting knowledge and thusly are wasting hours on repetitive tasks. And sometimes even think that the task assigned can't be done, as I know that everyone at my current employer would balk at the task the_Grinch details above.

    Can't say I've written as much code as the guy in the article claims to have written, but I do have a few hundred lines out there. Guess it proves PowerShell does more with less. :)

    I have noticed one of the dangers of scripting is that sometimes you have to keep your more powerful or more specific scripts under lock and key. Otherwise one of the guys with little to no scripting knowledge will run the script and possibly cause some damage or at least a fair bit of panic. I've started including some input validation in my scripts just for this reason and always include a few comments at the top to explain what the script is for even if I don't have the time to comment the script fully.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • Options
    blargoeblargoe Member Posts: 4,174 ■■■■■■■■■□
    You can know your operating environment inside and out and all the accompanying applications/services, but you will not become a truly elite admin unless you become proficient in some kind of scripting. Period. Got to have it.

    /EndThread
    IT guy since 12/00

    Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCE/Ansible
    Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...
  • Options
    higherhohigherho Member Posts: 882
    the_Grinch wrote: »
    Well I can say that knowing Powershell is really a God send. Everyone (the Powershell God!!!) helped me out a couple months ago with an issue that would have taken at least week, but with Powershell took about 15 minutes. One of our customers (complete 2008 environment) wanted to know every process running on every server using a none systems based account. The idea was they wanted to find out who's username it was running under and then change it to a system one in the event someone left. They had about 30 servers and since I was the night guy it fell to me. I knew there had to be a way to do it through Powershell and spent a few hours testing out scripts. Thankfully, with help from Everyone, he showed me how I could set it up to run from one server and query all the other ones. Then put the results in a spreadsheet, showing only the none system based processes. Ran the script and a few minutes later emailed it to the customer, along with the systems engineer. The customer (they had their own IT people as well) was stunned that it was completed so quickly and even our systems engineer couldn't believe it.

    I agree and scripting is cost effective and great asset if you dont have the automated tools to perform the tasks for you. Also develops your mind into thinking like a programmer (in a sense).
  • Options
    the_Grinchthe_Grinch Member Posts: 4,165 ■■■■■■■■■■
    Another example was when I was a deskside tech for a school district. They decided they wanted to redeploy 60 old iBooks back out to the students (since the teachers were given new ones). This meant running updates, changing a password, and renaming the hard drive. I got lucky and was assigned this task, it literally took forever. I could only do so many at a time due to having to use the wifi so while I started a couple running, I started to look at Applescript. Couple hours later I had a script that would change the admin password, rename the hard drive, and then run the updates. Put the script on each of the machines and then ran them 20 at a time (it was summer so bandwidth usage wasn't a big issue) and also ran them at night since they were in a locked room. Yay scripting!
    WIP:
    PHP
    Kotlin
    Intro to Discrete Math
    Programming Languages
    Work stuff
  • Options
    MAC_AddyMAC_Addy Member Posts: 1,740 ■■■■□□□□□□
    Speaking of PowerShell, what's the best way to learn? I've never even done anything in it, but I've heard it crop up many, many times.
    2017 Certification Goals:
    CCNP R/S
  • Options
    the_Grinchthe_Grinch Member Posts: 4,165 ■■■■■■■■■■
    WIP:
    PHP
    Kotlin
    Intro to Discrete Math
    Programming Languages
    Work stuff
  • Options
    MAC_AddyMAC_Addy Member Posts: 1,740 ■■■■□□□□□□
    Cool, I appreciate the link!
    2017 Certification Goals:
    CCNP R/S
  • Options
    undomielundomiel Member Posts: 2,818
    Check your local library for a few good books and then supplement with Google. The big thing is to make sure that you're applying it to solving real world problems otherwise it may just go in one ear and out the other.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • Options
    SlowhandSlowhand Mod Posts: 5,161 Mod
    This is a topic we've seen before here on TechExams, and it always tends to yield some great discussions regarding scripting, in-depth coding, and the role of programming in the world of network and systems administration. I, for one, am glad to see Microsoft moving back towards a scripting-focused environment where every product they role out is either a phase I (supports PowerShell scripts) or phase II (fully designed to utilize the PowerShell engine under the hood) technology. We need more people who understand the inner workings of Windows, who know not only AD but also how the Registry works, how to manipulate WMI, and even how some of the fundamental .NET classes can be used for administration. We need more proper sysadmins, not just "button pushers".

    As for how to learn, Don Jones is going to be your go-to instructor. As the_Grinch mentioned, that book is a great start. Don has also done a couple of series for CBT Nuggets, and you can find a LOT of resources on his site. I did a little **** of links to a blog post on TechExams recently, listing the resources I found as I was learning to write PowerShell.

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • Options
    antielvisantielvis Member Posts: 285 ■■■□□□□□□□
    Powershell. say no more.

    Thanks for the tip on the book. I been looking for one.
  • Options
    UnixGuyUnixGuy Mod Posts: 4,564 Mod
    Interesting article. Not sure I'd like to work with this guy who wrote 15,000 lines of Perl code across 53 scripts on one server; this screams inefficiency and disaster.

    My programming background is from college, it was mostly C/C++ and C#.NET. Most fun I had was with C++, and the most lines of code I wrote were in C# .NET 2003...(fun times!)


    On the system admin side of things, I've been using Bash for everything.

    I wrote one script to monitor all the production servers and produce an OK report, and scheduled it run two times everyday. I also wrote a script to apply security controls on every server. I wrote another script (upon request) to gather information about the server. Things like that, nothing complicated really. I understand in a web hosting environment and when you use something like Nagios or Puppet, much more scripting is needed. The current environment I work at, I monitor everything manually through (simple) scripts I developed.


    I'd like to know what kind of duties do you guys automate?
    Certs: GSTRT, GPEN, GCFA, CISM, CRISC, RHCE

    Learn GRC! GRC Mastery : https://grcmastery.com 

  • Options
    undomielundomiel Member Posts: 2,818
    A lot of my scripting revolves around Exchange deployment and administration but I also use a fair bit for task simplification such as building VPN configs and updating a bunch of Hyper-V configurations. Taking a look in my script repository the longest single script I have is 147 lines so nothing particularly impressive.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • Options
    MentholMooseMentholMoose Member Posts: 1,525 ■■■■■■■■□□
    undomiel wrote: »
    I definitely believe that scripting of some sort is a must have to move to the next level.
    This has been very true for my career. Scripting helped me transition past my first real IT job. I started as a junior sysadmin position, which was basically desktop support with a bit of sysadmin-level tasks thrown in. Using scripting I eliminated all of the repetitive desktop support tasks I found myself doing. This gave me the time to focus on getting more responsibility, which led to a promotion to sysadmin.
    MentholMoose
    MCSA 2003, LFCS, LFCE (expired), VCP6-DCV
  • Options
    discount81discount81 Member Posts: 213
    I think it is important to know, I have written a few small scripts to automate certain tasks.

    However I think expecting a System Administrator to be a master scripter/programmer is unreasonable.
    Looking at some of the job ads around now System Admins are expected to know a LOT.

    For me personally I am not a great programmer, so often writing a script to do something annoying and complicated will take more time than actually just doing it manually.
    Also we have GoverLAN at work, this is a great tool and helps do a lot of things I can't do with other software.
    http://www.darvilleit.com - a blog I write about IT and technology.
  • Options
    ptilsenptilsen Member Posts: 2,835 ■■■■■■■■■■
    Discount, I think the problem is with a lot of job postings in the industry. They expect deep knowledge of a wide array of unrelated or slightly related products. I think this is unreasonable and the wrong approach. I would rather have an administrator with good scripting skills, general networking and platform knowledge, who is smart and adaptable.

    Obviously it's important to take the path of least resistance -- scripting something complicated enough to do a one-time task on a few PCs doesn't make sense. However, if you get in the habit of scripting anything you don't have/can't quickly get a tool for, you'll find you can write better scripts in much less time, in turn saving even more time compared to manual work.

    Of course, the concept of doing it manually is moot outside of SMB. You can't do it manually on even a few hundred computers, much less a few thousand.

    It's true that there are lots of tools that can help us, but it's a mistake to stake your career on those. I have yet to see or even hear of a graphical tool that negates the need for scripting. Most of the great tools supplement scripts and make scripting easier, but they don't replace the need.

    I feel that the industry is headed strongly in this direction. The days of button-pushing-only admins are on the way out. Smart SMBs are moving to MSPs and cloud services, and larger businesses need people who can write scripts. Even as platforms are becoming more sophisticated, easier to manage, and easier to implement, I'm not seeing any reduction in what gets scripted. If anything, the need for more custom control over how systems work is increasing. Other tools can't keep up, so scripts come in.
    Working B.S., Computer Science
    Complete: 55/120 credits SPAN 201, LIT 100, ETHS 200, AP Lang, MATH 120, WRIT 231, ICS 140, MATH 215, ECON 202, ECON 201, ICS 141, MATH 210, LING 111, ICS 240
    In progress: CLEP US GOV,
    Next up: MATH 211, ECON 352, ICS 340
  • Options
    discount81discount81 Member Posts: 213
    I agree 100% with all your points, a modern System Admin should be able to do nearly any work in a Data Centre.
    I do think a System Admin should know powershell or bash, as these scripting languages are central the the Operating Systems we manage.

    However I have seen job ads where they asked for more advanced development languages, including some that asked for C++.

    If you are a business and you have large development projects and you also require your system to be managed, you are going to need to hire 2 people.
    ptilsen wrote: »
    Discount, I think the problem is with a lot of job postings in the industry. They expect deep knowledge of a wide array of unrelated or slightly related products. I think this is unreasonable and the wrong approach. I would rather have an administrator with good scripting skills, general networking and platform knowledge, who is smart and adaptable.

    Obviously it's important to take the path of least resistance -- scripting something complicated enough to do a one-time task on a few PCs doesn't make sense. However, if you get in the habit of scripting anything you don't have/can't quickly get a tool for, you'll find you can write better scripts in much less time, in turn saving even more time compared to manual work.

    Of course, the concept of doing it manually is moot outside of SMB. You can't do it manually on even a few hundred computers, much less a few thousand.

    It's true that there are lots of tools that can help us, but it's a mistake to stake your career on those. I have yet to see or even hear of a graphical tool that negates the need for scripting. Most of the great tools supplement scripts and make scripting easier, but they don't replace the need.

    I feel that the industry is headed strongly in this direction. The days of button-pushing-only admins are on the way out. Smart SMBs are moving to MSPs and cloud services, and larger businesses need people who can write scripts. Even as platforms are becoming more sophisticated, easier to manage, and easier to implement, I'm not seeing any reduction in what gets scripted. If anything, the need for more custom control over how systems work is increasing. Other tools can't keep up, so scripts come in.
    http://www.darvilleit.com - a blog I write about IT and technology.
  • Options
    ptilsenptilsen Member Posts: 2,835 ■■■■■■■■■■
    C++ I can see for certain types of admins, but I agree, it's not common and not a realistic request for most admin jobs.
    Working B.S., Computer Science
    Complete: 55/120 credits SPAN 201, LIT 100, ETHS 200, AP Lang, MATH 120, WRIT 231, ICS 140, MATH 215, ECON 202, ECON 201, ICS 141, MATH 210, LING 111, ICS 240
    In progress: CLEP US GOV,
    Next up: MATH 211, ECON 352, ICS 340
Sign In or Register to comment.