As I work with Windows systems, I admit both options are suboptimal, especially because they’re not installed by default. Also, the fact that PowerShell is object-oriented, makes it more suitable for some tasks with respect to the other options available. [Disclaimer: I strongly believe there is no “my tool is
bigger better than yours” thing and I do not want to convince those who think along those lines. If you’re happy with what you have, I’m happy for you. Move along.]
That’s why recently I’ve started to look into the magic realm of PowerShell. Here I list some information that got me move my first steps – hopefully they’ll be of use to all who embark on a similar journey:
- Windows 8 and Windows Server 2012 have PowerShell v3 installed by default. Windows 7 and Server 2008 shave got version 2
- You can choose to use one of the two hosts that come with Windows: the console and the Integrated Scripting Environment (ISE)
- The console, being based on the same software used for the command prompt, suffers from some limitations – for instance, it can’t display double byte charsets. The ISE can, and it’s got some other advantages, like the ability to display TrueType fonts, and to have multiple PowerShell sessions as tabs. On the other hand, the ISE is not installed by default on Server OSs
- If you type
powershellin the command prompt or
cmdor in the PowerShell console you switch instantly from one to the other system
- In Console, if you press
F7you can see the command history as a popup window.
Get-Historygives you access to another buffer where commands are recorded.
- Just like for the command prompt, clicking on the icon in the top left corner of the console window allows you to set your preferences for the window (buffer history, command duplication, height and width, colour, among the most commonly used)
key gives you auto-completion
Start-Transcriptnot only logs your command history as you type (like
%logstartin IPython) but also records the output for most commands (legacy commands like
pingdo not have their output recorded).
Stop-Transcriptclearly stops the logging