-
After delivering the Thanksgiving Gift this year, it’s time for a Holiday Gift …. No not as big as the one we had about 3 years ago …!! Today, we published the “Getting Started with Windows PowerShell Workflow” document on the CTP2 download page , just look for “WMF3...
-
There were quite a few name changes in the ISE Object Model from CTP3 to RC Using Update-TypeData, we can achieve some parity between the two We can add aliases to the CTP3 version to make it look like the RC Version For example, <Name>System.Management.Automation.Host.PSGHost</Name> <Members>...
-
One of the nifty features of functions in PowerShell is that they can return as many results from as many places as you’d like. In fact, any method or cmdlet that would give you an output if you try it on the command line will also return values from a function. While this can give you a...
-
Update to get PowerTab working in PowerShell CTP3 (Win7 and W2008R2) With thanks to Oisin Greetings /\/\o\/\/ Read More...
-
One of the systems administration hurdles of the post-Vista world is figuring out how to make a script run as an administrator. In PowerShell V2, using the Start-Process cmdlet, this is a one liner that will get the job done: Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList...
-
Jeffry Snover and many other have used Start-Demo in powershell.exe http://blogs.msdn.com/powershell/archive/2007/03/03/start-demo-help-doing-demos-using-powershell.aspx Continuing the tradition, we now have ISEDemo.psm1 To use it, start ISE and run Import-Module ISEDemo.psm1 #(attached) Start-Demo c...
-
I just got a ping on our internal discussion list about how to get at the Performance counters in PowerShell. In V2, we've got some nifty cmdlets to help read performance counters. Here are a few of quick one liners to get you started: # List all of the performance counters you can monitor...
-
Here is a collection of differences between the PowerShell_ise.exe and PowerShell.exe, as well as workarounds and suggestion if you need them (assuming we have them :)) Limited support for interactive console apps, try cmd.exe, then try cmd.exe /k cmd.exe /c dir still works though, and more information...
-
The other week, I showed a Get-ProgID function that I used to help someone at Microsoft Research find a good object to talk to images. A few comments jumped to one of the possible solutions, which is to use the .NET Drawing assembly (which I have to load first). I wanted to be reasonably sure that the...
-
Have you ever created scriptblocks on the fly, say in a foreach loop, and they totally mess up because they all have the same value? This is something sort of advanced, and typically used when you’re proxying an object. The most basic example would be, taken from ( http://www.powershellcommunity.org...
-
With Add-Type and $executioncontext you can add special varibles that have tied values. I made $random, and $now add-type @" using System; using System.Management.Automation; public class RandomVariable : PSVariable { Random r; public RandomVariable () : base("Random", 0, ScopedItemOptions...
-
Today someone in Xbox Live Operations (the folks that keep xBox Live alive and well) pinged me with a simple question about PowerShell with a complicated answer: “How do I create a class in PowerShell?” There’s two scenarios I find where people want classes. The first (and most...
-
If you want to find the cmdlet "behind" the alias ? , command Get-Alias ? won't help you, because ? will be treated as a wildcard for a single character, and you will get all single-character aliases: PS>get-alias ? CommandType Name Definition ----------- - --- ---------- Alias % ForEach...
-
I was playing with Doug Finke's extensions for PowerShell ISE (Integrated Scripting Environment), Expand-Alias and Expand-CurrentAlias , when I've noticed that mkdir doesn't expand and md expands to mkdir . Up until now I thought that mkdir and md are aliases for the New-Item cmdlet as rmdir...
-
PowerShell MVP Oisín Grehan has done a really good job in getting the diff between PowerShell releases. V1 and CTP3 http://www.nivot.org/2009/02/04/DifferencesBetweenPowerShell10RTMAndPowershell20CTP3Win7Beta.aspx CTP2 and CTP3 http://www.nivot.org/2008/12/23/PowerShell20CTP3HasArrived.aspx Thanks a...