PowerShell Team

Automating the world one-liner at a time…

Console Application (Non) Support in the ISE

There are some limitations on how the ISE interacts with console applications you need to be aware of, for apps like ftp and netsh.First of all, the ISE Runs console apps that don’t require user input just fine.For example, “ping www.microsoft.com” and “cmd /c dir /s”Piping also works fine in the ISE,For example, PS C:\Users\ibrar>...

Design of Script Friendly APIs, lessons from $psISE

Cmdlets are high level, task-oriented abstractions.  The implementation of cmdlets can talk to anything:  Web services, COM objects, WMI objects, .NET objects – anything.   Depending upon how developers design their API, they can make it easier or harder to write cmdlets.  Now that you can write cmdlets in PowerShell...

Diagnosing Here-Strings With PowerShell_ISE

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&#...

PowerShell_ISE Scripting: ConvertTo-Comment

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 ...

My Powershell_ISE Profile Part 2

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...

My PowerShell_ISE Profile

[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 ...

PowerShell_ISE and Visual Studio

Scott Fulton has a good article describing my PDC talk HERE.  In it he says, "Starting with version 2, a user can conceivably write new PowerShell cmdlets in PowerShell, using the built-in IDE, completely independently of Visual Studio."  This is true but there is more to the story so here it is. PowerShell's Integrated Scripting ...