PowerShell

PowerShell function Get-ScriptDirectory

Very often when I'm writing a script in PowerShell, I will need to obtain the directory in which that same script resides. This is sadly not completely trivial in PowerShell, but the following function achieves the desired result:

Hopefully, having created a gist for this and blogged about it, I won't have to keep resorting to Google in future to remind me how to do this. This particular version was posted to the PowerShell Code Repository by Andy Arismendi.

PowerShell one-liner: extract all zip files

I'm a big fan of TekPub and its thorough video tutorials on a wide range of development topics from frameworks like ASP.NET MVC and Ruby on Rails to building apps for the various mobile devices, to their free series such as key development concepts.

PowerShell -whatif

PowerShell is Microsoft's new command line shell for Windows. Version 1 was released in 2006, and version 2 has been in CTP for about a year now; it will finally RTM with Windows 7. It's a truly fantastic shell, and if you haven't looked into it already, I would urge you to do so. There's a wealth of information out there, not least on the PowerShell blog, that will get you started very quickly.

Coding:

Subscribe to RSS - PowerShell