An introduction to PowerShell
On Wednesday, August 27th, Tymon gave the rest of Encodo a great introduction to PowerShell. I've attached the presentation but a lot of the content was in demonstrations on the command-line.
- Download the presentation
- Unzip to a local folder
index.html in a modern web browser (Chrome/Opera/Firefox work the best; IE has some rendering issues)
We learned a few very interesting things:
- PowerShell is pre-installed on every modern Windows computer
- You can PowerShell to other machines (almost like ssh!)
- Windows developers should definitely learn how to use PowerShell.
- Unix administrators who have to work on Windows machines should definitely learn how to use PowerShell. The underlying functionality of the operating system is much more discoverable via command line,
get-member than the GUI.
- You should definitely install ConEmu
- When running ConEmu, make sure that you start a PowerShell session rather than the default Cmd session.
- If you're writing scripts, you should definitely install and use the ISE, which is an IDE for PowerShell scripts with debugging, code-completion, lists of available commands and much better copy/paste than the standard console.
- The PowerShell Language Reference v3 is a very useful and compact reference for beginners and even for more advanced users
The easiest way to integrate PowerShell into your workflow is to make it eminently accessible by installing ConEmu. ConEmu is a Windows command-line with a tabbed interface and offers a tremendous number of power-user settings and features. You can tweak it to your heart's content.
I set mine up to look like the one that Tymon had in the demonstrations (shown on my desktop to the right).
- Download ConEmu; I installed version 140814, the most recent version marked as "beta". There is no official release yet, but the software is quite mature.
- Install it and run it. I didn't allow the Win + Num support because I know that I'd never use it. YMMV and you can always change your choice from the preferences.
- Show the settings to customize your installation. There are a ton of settings, so I listed the ones I changed below.
- Set the window size to something a bit larger than the standard settings, especially if you have a larger monitor. I use 120 x 40.
- Choose the color scheme you want to use. I'm using the standard PowerShell colors but a lot of popular, darker schemes are also available (e.g. Monokai).
- Check out the hotkeys and set them up accordingly. The only key I plan on using is the one to show ConEmu. On the Swiss-German keyboard, it's Ctrl + ¨.
- The default console is not transparent, but there are those of us who enjoy a bit of transparency. Again, YMMV. I turned it on and left the slider at the default setting.
- And, finally, you can turn on Quake-style console mode to make it drop down from the top of your primary monitor instead of appearing in a free-floating window.