Showing results for CTP3 - PowerShell Team

Jan 4, 2009
Post comments count0
Post likes count0

PS> Dir –A D The Screencast

PowerShell Team
PowerShell Team

I decided to experiment with a screencast.  This is my first and I have no idea what I’m doing so please forgive me if it sucks.  I’d like to know whether you find this format useful or not and then specific feedback about how to make the screencast better (e.g. I recorded it at 1024x768  - is that good or too large?). In my previous...

CTP3PowerShell V2Jeffrey Snover
Jan 4, 2009
Post comments count0
Post likes count0

Extending and/or Modifing Commands with Proxies

PowerShell Team
PowerShell Team

There are so many powerful features in V2, it is hard to know where to begin.  This one is going to blow to top of your head off when you understand what it enables you to do. In this blog, I talk about Proxy Cmdlets which is the ability for one Cmdlet to call another.  You could always do this but to do it right has always been very diff...

CTP3PowerShell V2Jeffrey Snover
Jan 3, 2009
Post comments count0
Post likes count0

Diagnosing Here-Strings With PowerShell_ISE

PowerShell Team
PowerShell Team

James Brundage posted a blog entry How To Write a Console Application in PowerShell with Add-Type which used a here-string.   One user (lcr) copied and pasted the text and got the following error: Unrecognized token in source text. At line:1 char:72 + Add-Type -OutputType ConsoleApplication -OutputAssembly HelloWorld.exe  &...

CTP3PowerShell V2Jeffrey Snover
Jan 2, 2009
Post comments count0
Post likes count0

How To Write a Console Application in PowerShell with Add-Type

PowerShell Team
PowerShell Team

Windows PowerShell CTP3 has a lot of very cool things.  CTP2 introduced the Add-Type cmdlet, which allowed you to dynamically compile C# in PowerShell.  It was actually possible to use the CompilerParameters to Add-Type to make a console application, but it wasn't particularly easy.  In CTP3, we've made this a lot easier to do. Ther...

CTP3HowToAdd-Type
Jan 2, 2009
Post comments count0
Post likes count0

A Module to Create Modules and Advanced Functions

PowerShell Team
PowerShell Team

[1/3/09 Update - the original link to the attachment containing this code was broken but is now fixed.  Sorry. jps] It is hard to overstate how important Modules and Advanced Functions are.   If you are a PowerShell user - you need to take the time to learn these new mechanisms and use them as your first choice in implement...

CTP3Jeffrey SnoverAdvanced Functions
Dec 31, 2008
Post comments count0
Post likes count0

PowerShell_ISE Scripting: ConvertTo-Comment

PowerShell Team
PowerShell Team

Let me combine a couple of things.  1) When I posted my PowerShell_ISE profile, I included a function Goto-Line that is now builtin to the ISE so I reposted the blog with this function commented out. I commented it out instead of deleting it because I wanted to provide an example of how to do it. 2) Vivek Sharma left a comment asked about p...

CTP3Jeffrey SnoverPowerShell ISE
Dec 30, 2008
Post comments count0
Post likes count0

My Powershell_ISE Profile Part 2

PowerShell Team
PowerShell Team

I messed up. First let me remind you that what you have are CTP bits and that CTP bits are subject to change.  It turns out that we are tweaking the PowerShell_ISE object model and that the profile I posted does not work with CTP3.  I’m sorry for that screw up. You can use the amazing PowerShell_ISE to fix this problem.  All you ne...

CTP3Jeffrey SnoverPowerShell ISE
Dec 29, 2008
Post comments count0
Post likes count0

My PowerShell_ISE Profile

PowerShell Team
PowerShell Team

[UDPATE - the original post had a script which did not work with CTP3 so I've replaced it with the correct version.  Apologizes for the screw up. I've updated the attached file as well. - jps]  I thought I would share my PowerShell_ISE profile with you.  I haven't done anything to clean this up or document it which I shoul...

CTP3Jeffrey SnoverPowerShell ISE
Dec 24, 2008
Post comments count0
Post likes count0

PowerShell V2 – External MAML Help

PowerShell Team
PowerShell Team

As you’ve probably picked up by now – Advanced Functions are super important. We've been showing a bunch of scripts that have embedded help using comments and dot-tags. Let me take a second and drill into this. We believe that PS will be used in a wide range of; scenarios: simple one liners; personal ad hoc scripts; scripts you share with your ...

CTP3Jeffrey SnoverHelpFile
Dec 24, 2008
Post comments count0
Post likes count0

PowerShell v2 Pipelining in 73 (make that 53) Characters

PowerShell Team
PowerShell Team

I started using Twitter and saw a request from Thomas Lee for help about pipelining in CTP3.  The thing about Twitter is that the messages have to be tiny so I wasn’t sure I could answer using it.  It turns out I can solve this problem AND give a usage example in 73 characters.  Here goes: PS> function t{param([Parameter(ValueFro...

CTP3Jeffrey SnoverAdvanced Functions