We should consider putting this in one of the base cmdlets at some point. We are using it a lot.