Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

A Return to Command-Line Control with Windows Powershell

The new Windows Powershell not only provides flow of control, but the strong typing of its variables and expressions enables you to manipulate them and create scripts that leverage the .NET Framework.


advertisement
ack in the days of personal computing, the user could control almost every aspect of his or her machine's environment and behavior from the command line. If you really needed extra power, GW-BASIC let you interact with the system. As Windows got bigger and bigger, the graphical user interface (GUI) dominated the computing model, seducing non-technical users with its point-and-click ease. But the ascendancy of the graphical metaphor enucleated the command line and forced users to use the mouse for everything, which left the command line dormant and unimproved since DOS 6, the last stand of the command line. Well, the capability and control offered by the command line is back in spades.

A couple of years ago, many Windows Server professionals were expecting to use Windows Scripting Host (WSH) for administrative jobs such as collecting performance data. However, security vulnerabilities led to that tool's fall from grace. Most turned to UNIX and its powerful scripting facilities, which don't carry the weight associated with facilitating similar features in Windows.

UNIX shells contain numerous tiny utilities that hold to the maxim: "do one thing and do it well." However, the way to tap into the real power of these shells is to leverage the output of one program as input to the next by using pipes and redirection. Attaining similar functionality in Windows requires significantly more overhead, including a framework, another language(s), and even a new IDE (Did we just invent YASDE?).



All this extra stuff was necessary because commands that came with the command shell were basically the same ones you got from, say, DOS 2.0, when "print" became part of the command processor instead of an application. That is, as we were swallowed up by the hegemony of the GUI, it took more and more horsepower to do what previously was direct and efficient.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap