Register : : Login
menuleft menuright
submenu
 
By Karl Prosser on 1/16/2010 8:27 PM

Have you ever just wanted to run a line or two of C# from within PowerShell and consume the resulting objects from PowerShell? Before V2 you had to do some codedom yourself Plus write a full dotnet class yourself. With V2 you can just do add-type but still you have to write a full class just to run an expression. Anyway how about a year ago after getting fed up with doing that, and also after seeing Mono's C# commandline interface i thought lets do something quick and dirty that could do this.. with the script that will follow you can do stuff like (c being an alias for the function that compiles and runs a C# expression

(c DateTime.Now).adddays(5)
(c "new{a=1,b=2,c=3}").b
c 'from x in Directory.GetFiles(@"f:\downloads") where x.Contains("win") select x'

an interesting thing i found out, was that with the C# compiler in memory i can't create more than one anonymous type (2nd

By Karl Prosser on 7/20/2009 9:28 PM

 

What is it?
Portable PowerShell is software that allows you to run PowerShell on machines that don’t have PowerShell installed that you can run from a Machine that doesn’t have PowerShell on it, from a USB stick, on a machine that has a different version of PowerShell, a preinstall environment like BartPE, or WinPE or when booted to a windows 7 recovery DVD....
By Karl Prosser on 1/8/2009 12:53 AM

Though we don’t have intentions to carry developing PowerShell Analyzer much in the future, there are a number of improvements in my personal fork, and we want to make sure that it keeps its shelf life by updating it for PowerShell V2. Surprisingly we are still getting hundreds of downloads a day so we want to make sure that those who prefer PSA can still keep using it and also take advantage of the features I use day in and day out. We’ll probably release some new builds within the next couple of weeks, but will post some screenshots and maybe videos until then. We hope that will minimal effort keep PSA the best free PowerShell tool. Read more below to see the screenshots and examples

By Karl Prosser on 1/3/2009 7:14 PM

PowerShell CTP3 ISE - Integrated Scripting environment has inherited many ideas and features from PowerShell analyzer including multiple runspaces,editors, a smaller immediate input area and output pane, however it doesn’t have the output visualizers of PSA nor the super fast RTS like execution control of PSA.

However Microsoft in their wisdom has made ISE rather extensible through the $PSISE variable, and many people already have added some very cool functionality to ISE through these.

When I first demo’d what was then MSH analyzer to Microsoft back in the first few months of 2006, the feature that seemed to stand out the most to the team was the ability to select an area of code and just run that. Thankfully that level of execution control is now in ISE as F6, but I wanted more, so i’m going to share with you a script that build a few months ago to add a couple of features.

F7 run the current physical line.

By Karl Prosser on 12/19/2008 4:58 PM

SURVEY: http://spreadsheets.google.com/viewform?key=pgTpVBomNgDwUA9uQNRKAbw&hl=en

Taking an app from an internal application to a shrink-wrap ready for
the masses state is a lot of work, and updating/supporting/marketting
a product even more so. So after the huge sucess of PowerShell Plus
which is now safe in Idera's hands we need your help to decide what we
are going to release next. We plan to release some free projects, even
some opensource apps, but will likely look at productizing a project
so we can continue to feed our families. Please take the time to take
our survey
 

By Marco Shaw on 6/27/2008 4:52 AM

PowerShell Usability Study, July 22 to July 29, 2008 at Redmond, WA

By Karl Prosser on 6/17/2008 9:15 PM

So I've loved portable apps from time memorial and have valued making my own apps as portable as possible - XCOPY friendly.

By Karl Prosser on 6/17/2008 9:12 PM

Given the context on the last few posts. I've made a simple helper method in C# that can take a simple powershell hashtable and create a PSCustomObject based on it. Here is an example of how you can call it.

By Karl Prosser on 6/17/2008 9:08 PM

Based on the performance testing and work being done by myself , mow , Brandon Shell and others the question has come up what is the quickest way to generate a PSCustomObject, whether in script , on in C#, and how do you even do it in C#?

Some typical ways of doing in PowerShell have been either something like the following trick:

By Karl Prosser on 6/11/2008 9:23 PM

I've spend a lot of time in the past looking at the performance of PowerShell but have never gotten around to blogging about it. However it has become quite a hot button among MVPs and others in recent days and we've been busy testing and comparing the speeds different techniques in PowerShell in both V1 and V2.

In V1 there seems to be extreme slowdowns when invoking cmdlet, functions, any type of scriptblock and when using the pipeline. If you...

 
Blogs
  
Search Blogs
  
Archives
  
   
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
footer