Windows PowerShell in Action

Well folks, at long last, my book is almost done 🙂 Before it goes out for print, you can get electronic copies through Manning’s early access program:  The early access program is a chance for readers to provide feedback on a book so the author can fix things.  As Jeffrey says – enjoy! -bruce =========================================================… Read more

Setting the console title to be your current working directory

jmanning wrote: Also, given how common the request is, I’d ask Jeffrey to (pretty-please) also include in this post a prompt function that sets the title to include pwd. Ask and yea shall receive: function Prompt{  $host.ui.RawUI.WindowTitle = $(get-location)  “PS> “} If you want to see a bunch of great prompt examples, check out:… Read more

Use of Preference Variables to control behavior of streams

PSMDTAG:FAQ: Why don’t I see output when I use Write-Verbose and Write-Debug?PSMDTAG:SHELL: Use of Preference Variables to control behavior of streams. In Windows PowerShell, the WRITE-XXX cmdlets merely sends things to a Named stream.  You then have user-defined preferences for what to do when things appear on that stream.  Alex Angelopoulos provided the following function… Read more

Perserving Command History Across Sessions

<Edited 7/2/2006 to add tags and Categories> Ben Winzenz didn’t like the fact that Windows PowerShell did not maintain history lists between sessions ( .   We hear you Ben.  Back to my least favorite phrase, “to ship is to choose”.  That said, we try to give you in the community the power to do that which… Read more

The new TabExpansion feature…

One of the nicest new features in the latest drop of Windows PowerShell is enhanced tab-completion. We now tab-complete properties on variables and parameters on cmdlets in addition to the old filename completion. But that’s not the interesting part. The cool bit is that it’s done through a user-definable function. In the same way that… Read more

Comparative Examples in MSH and KSH

  Most shells (such as Windows CMD.EXE and the UNIX shells SH, KSH, CSH, and BASH) operate by executing a command or utility in a new process, and presenting the results (or errors) to the user as text. Text-based processing is the way in which system interaction is done with these shells. Over the years,… Read more