PowerShell for Developers: Slides for my TechDays 2010 Finland presentation
If you’re after my slides for my TechDays 2010 presentation earlier today (“PowerShell kehittäjille”, a.k.a. PowerShell for Developers), look no further. Unfortunately, the material is in Finnish only.
You can find the slides and one of the demo scripts in a single zip package. Also, if you want the WebNote demo, the solution is available in [...]
March 9, 2010
Tags: PowerShell Posted in: .NET
No Comments
PowerShell Basics #4: Matching and capturing with regular expressions
Using regular expressions on Windows hasn’t been particularly easy, as the standard command-line tools have provided very little support to these powerful beasts. On the other hand, various spawns of Unix have had loads of support for regexes on the command line, including classic tools such as grep, sed and awk.
PowerShell changes things here. It [...]
February 13, 2010
Tags: PowerShell Posted in: .NET
No Comments
PowerShell Basics #3: Manipulating data in text files
To continue my series of PowerShell Basics posts, I’ll cover some basic features around manipulating text file data.
First off, the problem is really two separate problems: Handling text file IO and manipulating the contents. PowerShell provides decent tools for both, and since everything is just .NET objects, you can run any .NET string manipulations you [...]
February 5, 2010
Tags: PowerShell Posted in: .NET
No Comments
PowerShell Basics #2: Dir for power users
You would think the standard dir command in cmd.exe would do its job adequately, but it’s still surprising how much more functionality can you pack into it. Here’s an introduction to power-using Get-ChildItem, also known by the aliases of dir and ls.
Leveraging FileInfo and DirectoryInfo
For starters, it is important to remember that dir returns objects. [...]
January 28, 2010
Tags: PowerShell Posted in: .NET, Windows IT
No Comments
PowerShell Basics #1: Reading and parsing CSV
I will be giving a talk on the topic of “PowerShell for Developers” at TechDays 2010 in Helsinki, Finland. As a warm-up to my presentation, I will be publishing a series of blog posts on various aspects of PowerShell. My viewpoint is specifically one of developer utility: What can PowerShell do to make a dev’s [...]
January 22, 2010
Tags: CSV, PowerShell Posted in: .NET
No Comments
Creating custom types in PowerShell, revisited for v2
In June, I blogged on creating custom types within PowerShell. In PowerShell v2, released with Windows 7 and Windows Server 2008 R2, things are a bit easier.
Now, the syntax for adding properties is far nicer, as you can pass a hashtable of values to add-member. Namely, the previous example of enumerating the applications run at [...]
January 20, 2010
Tags: PowerShell Posted in: .NET
3 Comments
PowerShell: PSObject, custom types and the add-member cmdlet
PowerShell is .NET-based in the sense that it allows reasonably free manipulation of CLR objects. However, the shell language differs drastically from the familiar object-oriented languages that are typically used with classes and objects. In this post, I’ll discuss some of the aspects involved in handling custom objects in PowerShell.
Note: I have posted an update [...]
June 14, 2009
Tags: PowerShell Posted in: .NET
2 Comments
