Blog Archives

Free PowerShell eBook from Keith Hill

Keith Hill has turned his Effective PowerShell series of blog posts into a 50-page PDF. He just posted Effective Windows PowerShell yesterday.

Tagged with: ,
Posted in PowerShell

DSLs in PowerShell

In an earlier post, I quoted John Lam saying that one reason Ruby is such a good language for implementing DSLs (domain specific languages) is that function calls do not require parentheses. This allows DSL authors to create functions that

Tagged with:
Posted in PowerShell

PowerShell A-Z series completed

Joe Pruitt has finished his PowerShell A-Z series.

Tagged with:
Posted in PowerShell

Joe Pruitt’s PowerShell ABCs

I just ran across a nice series of PowerShell posts by Joe Pruitt called the “PowerShell ABC’s,” one post for each letter of the alphabet. He’s up to O so far. Arithmetic operators Begin CmdLet Debugging Execution policy Format operator

Tagged with:
Posted in PowerShell

Negative space in operating systems

Unix advocates often say Unix is great because it has all these powerful tools. And yet practically every Unix tool has been ported to Windows. So why not just run Unix tools on Windows so that you have access to both tool

Tagged with: ,
Posted in Computing, Creativity, PowerShell

PowerShell version 2 timetable

Looks like it will be another year until PowerShell version 2 comes out. See Dmitry’s PowerBlog for details.

Tagged with:
Posted in PowerShell

Table-driven text munging in PowerShell

In my previous post, I mentioned formatting C++ code as HTML by doing some regular expression substitutions. I often need to write something that carries out a list of pattern substitutions, so I decided to rewrite the previous script to

Tagged with: ,
Posted in PowerShell

Manipulating the clipboard with PowerShell

The PowerShell Community Extensions contain a couple handy cmdlets for working with the Windows clipboard: Get-Clipboard and Out-Clipboard. One way to use these cmdlets is to copy some text to the clipboard, munge it, and paste it somewhere else. This

Tagged with: , ,
Posted in PowerShell

Regular expressions in PowerShell and Perl

This is one of the most popular pages on my web site: Regular expressions in PowerShell and Perl It’s about how you use regular expressions in PowerShell — how to do matches, replacements, etc. — rather than the grammar of

Tagged with: ,
Posted in PowerShell

Experimenting with Out-Speech in PowerShell

I’ve played around with the PSCX script Out-Speech at home and at work. At home, running Vista, words come out in a natural female voice. At work, running XP, words come out in a robotic male voice. The voice is somewhat

Tagged with:
Posted in PowerShell

Depend on objects, not their presentation

The most recent blog post by Jeffrey Snover emphasizes that PowerShell pipes objects, not text. When you use single PowerShell commands, you can get the impression that they output text.  But everything is an object until the pipeline spills onto

Tagged with:
Posted in PowerShell

PowerShell posts classified

Here’s a summary of the blog posts I’ve written so far regarding PowerShell, grouped by topic. Three posts announced CodeProject articles related to PowerShell:  automated software builds, text reviews for software, and monitoring legacy code. Three posts on customizing the

Tagged with:
Posted in PowerShell

PowerShell output redirection: Unicode or ASCII?

What does the redirection operator > in PowerShell do to text: leave it as Unicode or convert it to ASCII? The answer depends on whether the thing to the right of the > operator is a file or a program.

Tagged with: ,
Posted in PowerShell

Improved PowerShell prompt

A while back I wrote a post on how to customize your PowerShell prompt. Last week Tomas Restrepo posted an article on a PowerShell prompt that adds color and shortens the path in a more subtle way. I haven’t tried

Tagged with:
Posted in PowerShell

PowerShell one-liner to filter a sitemap

Suppose you have an XML sitemap and you want to extract a flat list of URLs. This PowerShell code will do the trick.   ( (gc sitemap.xml)).urlset.url | % {$_.loc} This code calls Get-Content, using the shortcut gc, to read

Tagged with: , ,
Posted in PowerShell