People bangin here (stats)

keskiviikko 25. toukokuuta 2011

Windows Powershell, Getting inhaled (part 1)

Powershell had evaded me for quite a long time. Checking the facts now, the scripting technology of Microsoft had been established already in 2006 - I'm not going to waste time and dig for the exact chronology.

Then one day... I saw this remarkable violet weed in the forest. It lured me closer and closer. I took my camera out, made it go into a macro mode, and felt the shutter click. The plant was most intriguing. All those fractal branches...

I somehow didn't like Powershell so much. To be honest, the syntax and most of its output seemed somehow hollow compared to Unix and Linux shell scripts that I'd been used to. But on the other hand I knew Microsoft platform and PCs running on it would be probably a big part of my studies and work, so getting more tools to cut back on the repetitive slack would be a sane thing to do. After all, computer science and practical management of IT should be about creating and doing things the way you want, not the way you're being told by your computers.

Using shell scripting has benefits. Even though it has a learning curve and it's not easy in the beginning, you can't much disagree with the benefits:

  • repeatability of processes
  • speed (versus doing by hand)
  • unrelentless and ever vigilant execution of monitoring
  • effort can be duplicated
  • someone else can do useful things and distribute them to you
Let's get down to work. Powershell is a free software package for Microsoft Windows platform. Meaning, it doesn't come packed automatically with it. This is Microsoft's strategy many times: bare bones usability and everything extra comes via installation. And European Union courts also have something to say in the palette of competitiveness allowed ;-)

Apart from the WWW, one of the best places to learn is Microsoft's technical net, Technet. There you can find tools, articles, Q&A, blogs, and other useful links. Look for the latest version of PowerShell. It's currently running in 2.x version train but may well be increased in the future.  

I had trouble finding a proper download page. This is sometimes a major headache with Microsoft, since it has a kind of matrix of products: main operating system lines (Xp, Vista, 7, ...) crossed with 32- or 64-bit versions, and add up to that the possibility to have localized versions... voila! You sometimes stare at pages after pages of links, and wonder which one of them matches you. However, look and be persistent in your search, you will find it. I won't supply a link here, since based on my experience the page structure of MS Web changes quite often, so you'd just hit a 404 Not Found or some other error with the link.   

In the next part... We'll be looking at Powershell 2.0 installation. Wrapping the guts of our first cmdlet - or, script. Learning a bit of the vocabulary and context of commands. Stay tooned! 

Ei kommentteja:

Lähetä kommentti