PowerShell: Determine your function’s position in the pipeline
I just posted an article to the FAQ on the PoshCode Wiki answering this question that came up again on our IRC PowerShell user group today. It came up in the context of determining whether a function was the last function on the pipeline, because one of our users was looking for a way (other [...]
Windows PowerShell 2.0 SDK Released
So, the Windows PowerShell 2.0 Software Development Kit is basically a collection of samples, and it has been released separately from the Windows Platform SDK for a change, making the download a tiny 2.35MB … There are lots of examples in there in C# (no other languages), and honestly, some of them ought to make [...]
PowerShell Script Club in Rochester on Wednesday
Consider this a reminder that December is ScriptClub month at our local PowerShell User Group. What is Script Club? Script clubs are like a hands on lab with no set topic or teacher. You bring an idea for a script, and ask your fellow PowerShell users for help getting the script written. Pretty much anything [...]
JSON from PowerShell (but why?)
Putting together some scripts from Keith Hill and some of my own code … and using the System.Runtime.Serialization.Json namespace, I’ve managed to make a few pieces to import and export JSON for you to play with. I put it on PoshCode. This code is very raw at the moment, and quite honestly, the only function [...]
Ignoring Namespaces in XPath
I know that I just wrote a post last week about XPath and namespaces in PowerShell, but at the time I left out one possible way of dealing with namespaces, because it’s not the right way of doing things. However, sometimes it’s nice to have options, and when you’re working on the command-line in PowerShell, [...]
Using Notepad++ For PowerShell Editing
A while back Thell Fowler (with a little help, and a lot of testing from me) wrote a very good PowerShell Lexer for Notepad++ 5.2 and later… it’s very thorough, has good code-folding, and full support for PowerShell 2.0 syntax highlighting. I mention this because Notepad++ 5.6 just released yesterday, and it has built-in support [...]
XPath and Namespaces in PowerShell
Although there are a few “CSS Selector” libraries, most browsers haven’t even implemented CSS3 selectors, never mind frameworks like .Net or scripting languages like Javascript or PowerShell so XPath remains the most powerful way to deal with finding specific data in an XML file, and by extension, XHTML and even HTML files (if you can [...]
Fixing Search Results: PowerShell 2.0 is RTM
For some reason, people are having trouble finding links to the release version of Windows PowerShell 2.0 … I suspect it’s because while it was in CTP, a lot of us bloggers wrote about it and linked to the various CTP downloads … but there aren’t nearly as many posts announcing the release of Windows [...]
Signing PowerShell Scripts – Automatically
I write a lot of PowerShell scripts, and I work on modules a lot, including ones which I load automatically in my profile. Sometimes I forget to sign those modules before I restart my console/host, and then I get errors when they’re loaded from the profile. I wrote a script to solve this problem by [...]
Mono Tools for Visual Studio allow cross-platform remote debugging
Image via Wikipedia Ok, the Mono team has announced the release of their Mono Tools for Visual Studio which really picks up on your ability (as a Windows-based .Net developer) to target Linux and Mac for application deployment. So, yeah: no thanks to Microsoft (well, not directly, anyway), Visual Studio is sort-of a cross-platform development [...]