Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » CTP3   (RSS)

Update-TypeData, ISE CTP3 vs ISE RC, and Teched2009 Demos

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>
Posted by PowerShellTeam | 2 Comments
Attachment(s): IseRCType.ps1xml

V2 Quick Tips: Finding Extra Outputs From Your Script

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
Posted by PowerShellTeam | 0 Comments
Filed under: ,

V2 Quick Tip: Starting a new elevated process from a PowerShell script

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"
Posted by PowerShellTeam | 6 Comments
Filed under: ,

Do PowerShell Demos in the ISE

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
Posted by PowerShellTeam | 2 Comments
Filed under: ,

Attachment(s): ISEDemo.psm1

V2 Quick Tip: Monitoring Performance Counters with PowerShell

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
Posted by PowerShellTeam | 6 Comments
Filed under: ,

Differences between the ISE and PowerShell console

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

Image Manipulation in PowerShell

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
Posted by PowerShellTeam | 2 Comments
Filed under: ,

Attachment(s): Image.zip

Get closure with GetNewClosure

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,

Tied Variables in PowerShell

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 ()
Posted by PowerShellTeam | 4 Comments
Filed under: , ,

Attachment(s): New-ScriptVariable.ps1.txt

How to Create an Object in PowerShell

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
Posted by PowerShellTeam | 7 Comments
Filed under: ,

Diff between Windows PowerShell versions

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
Posted by PowerShellTeam | 4 Comments
Filed under:

Getting Alternate Streams (Verbose, Progress, Debug) with the PowerShell API

Dozens of people could write dozens of books on all of the cool stuff we improved in V2 of PowerShell.  One of the nice little things we did was give a more understandable API than Pipeline (which is the class you can use to invoke code from C# in
Posted by PowerShellTeam | 1 Comments
Filed under:

Debugging PowerShell Script Using the ISE Editor

Hi writers and consumers of buggy scripts. This post explains the basics of the Graphical Debugger in the ISE. There’s a lot of good stuff, with some tips and tricks. The debugger support got the cmdlets and user interface. The cmdlets include Enable/Disable/Get/Set/Remove-PsBreakpoint
Posted by PowerShellTeam | 8 Comments
Attachment(s): debugger.png

How To Make Your Own Module Repository

Andy Schneider (from Get-PowerShell.com ) recently asked me how he could make sure that everyone at Avanade could get a consistent set of modules. I run into a somewhat similar problem here at Microsoft, where I want to take scripts I've built to work
Posted by PowerShellTeam | 8 Comments
Filed under: ,

Interactive remoting in CTP3

Today let's talk about one of the cool new features of Windows PowerShell V2 - Interactive Remoting. Let’s start with an example: PS> $env:COMPUTERNAME # Check local computer name. VLADIMIA64 PS> Enter-PSSession Vladimia06 # Remote to other computer.
Posted by PowerShellTeam | 18 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker