3

Why did I start learning PowerShell

Hi, my name is Adam and I wrote this article to try and entice other people into learning something new—and for me that was Microsoft PowerShell.

It started back a couple of years ago, but as a non-programmer, and more of a point and click person I knew that this was not going to be something I could learn in 24 hours, probably not even 48 hours. So, I began by purchasing a hardback PowerShell book “Windows PowerShell Step By Step” it seemed a good place to start, and it was. I was soon learning the way to script in PowerShell. I was soon searching on the web for everything PowerShell-related. It really was an information overload at first, thinking I would never really grasp this language, without copying examples from a book. So I purchased a few more hardback copies of PowerShell books: Pro Windows PowerShell, PowerShell in Practice, and PowerShell in Action.

Even though my day job of being a 2nd line support technician had no requirements for scripting, one fine day a big opportunity presented itself.  I was asked to go and shadow a consultant on surveying a site for a whole new system to be implemented. Part of the survey process was to get certain information from each PC/laptop onsite that the customer already had. The way it was being done was to get on your hands and knees, record the tiny half-scratched off serial number on the PC, or going into the BIOS to retrieve this info, then boot up the PC/laptop, and record how much RAM and hard disk space each PC/laptop had, then similar but more audit checks for servers. After shadowing this consultant for one day seeing how much time and effort needed to go into this process, I went home that evening and decided it was time to unleash the PowerShell I had been learning in my own time. That was a long but re-warding evening; I had developed a script that would obtain all the information required but AUTOMATICALLY without human intervention. On bigger sites it was taking 4 consultants several days to survey one site. PowerShell on the other hand could audit me 500 computers in 10 minutes. Yes, that is correct, 500 machines audited in 10 minutes, as opposed to days, and obviously no human error in recording the details. I did make several modifications to the script when requested. I have to say that I reached to Twitter for some queries, as Twitter has some really, really cool PowerShell ‘heads’ on there who always seem more than happy to answer a PowerShell question or query. In general I have found that anyone I chat to about PowerShell is more than happy to share the knowledge, which only makes the community stronger.

This then set me to start thinking what other things I could script for the company I  work for. I knew the health checks were something I did not like doing as it was a boring point and click process and took some time to do, and obviously very repetitive. So again, with the help of the mighty PowerShell and WASP (a snap-in for PowerShell), I was able to automate this whole task, and even email myself the results!

I knew another big project was coming up to remove certain software and required SQL to be uninstalled, and after using Google, I could not find any automatic way to uninstall SQL with no intervention. PowerShell with the WASP snap-in did the job again! What was even more pleasing was to hear that this was classed “impossible” to automate from other colleagues.

I have even now been asked to write a script by our development team!
I guess the point I’m trying to get across is since I have been learning PowerShell, nothing now seems ‘impossible’ anymore. And believe me if you read enough PowerShell it sticks!
Seems PowerShell is being integrated into more and more Microsoft products, and is ultimately the future of scripting, and possibly Windows administration.

So, what are you waiting for? There are enough free PowerShell eBooks and other documentation on the Internet to wet your taste buds, so get on it and learn something new.  Only last night looked into creating a custom troubleshooting pack for Windows 7, and again the actual bit that fixes your computer is PowerShell-scripted!

I really do hope if you have not looked into PowerShell you do after reading this. Thanks for reading, and hopefully the next thing you will be reading is PowerShell-related.

Would you like to share your story? Win one of TrainSignal’s PowerShell training courses? Learn more about the “How I Learned to Stop Worrying and Love Windows PowerShell” contest.

Filed in: Articles, How I Learned to Stop Worrying and Love Windows PowerShell Tags: ,

3 Responses to "Why did I start learning PowerShell"

  1. Adam, I myself started in helpdesk before I began a set of career moves that led me to development, although I didn’t learn powershell until after becoming a developer.

    I’m curious, when you write these scripts for the developers, do they take ownership of the scripts, or do they rely on your for maintenance? Have you been able to mentor others in your organization to become PowerShell scripters?

  2. Adam Bacon says:

    Dear Justin,
      Thanks for the comment, first time I have ever written an article, so hopefully you enjoyed. To be honest the scripts that I have written have only been a few, to script X,Y and Z. Then yeah the developers have my script, but I do always comment my scripts with author etc. So I don’t think the need for maintenance of the scripts is needed.  Believe me I have tried to influence others on Powershell, but as I have read in a powershell book (i can’t remember which one) but saying that a lot of todays administrators cannot script….and its true! Sadly does not seem others want to join me on this great experiance yet who i work with….but as mentioned I am 2nd line support, so scripting is not in my job requirements, just nice that I can do it for the comapny I work for.
    Thanks for reading
    Adam

  3. Pedro says:

    Muito bom!!

    Parabens, estou no mesmo caminho, trabalho com suporte há 18 anos e sempre gostei de scripts, sempre fui fã do velho e saudoso MS-DOS e até hoje, utilizo os scripts em .BAT mas já estou estudando o powershell também. Justamente devido à sua integração e poder. O powershel é hoje o que o shell é para o linux. Coisa que o .BAT nunca conseguiu ser porque ele nasceu em uma época em que não havia redes e tantos outros recursos. Mas até hoje serve bem.

    Linha de comando é poder.

Leave a Reply

Submit Comment

© 2016 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: