PowerShell Team

Automating the world one-liner at a time…

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 first).  I wanted to be reasonably sure that the way to get at the image ...

Active Directory Administrative Center for Windows Server 2008 R2 implemented using ADPowershell!

Windows Server 2008 R2 doesn’t just add ADPowershell – it also adds Active Directory Administrative Center (or ADAC), a new GUI tool for AD administrators.  Read about it on TechNet.  What’s more, while you can’t tell just from looking at it, ADAC is implemented entirely over Windows PowerShell 2.0 and ADPowershell!  ...

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, taken from (http://www.powershellcommunity.org/Forums/tabid/54/aff/1/aft/2506/afv/topic/...

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 ()  : base("Random", 0, ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope)  {r = new...

Get-ProgID

The other day, a friend over in Microsoft Research wanted to figure out how to get out the width and height of an image in PowerShell.  There are many ways that you can approach this particular problem.  I knew three right off of the top of my head, but none of them had a really optimal experience. I knew there had to ...
Comments are closed.0

Active Directory Powershell Blog

AD team has started a new blog for their PowerShell Cmdlets.. In their own words "We are here to answer any questions about AD Powershell, share some tips and tricks, discuss the history behind certain decisions and features and hear your feedback on improving AD Powershell experience" Check this out http://blogs.msdn.com/adpowershell/  ...

Local Boy Makes Good

Check it out:  http://www.microsoft.com/presspass/exec/de/snover/default.mspx One of the biggest Snoopy Dance moments of my life!   BTW - this is really a reflection of how important Microsoft views PowerShell. I'd love to say more but I've got some Snoopy Dancing to do.   Experiment! Enjoy! Engage! Jeffrey Snover [MSFT...
Comments are closed.0

dir –a:d

In cmd, listing files based on attributes was simple: In PowerShell, it’s not so easy: We have had requests to cover the first case better, for example: https://connect.microsoft.com/feedback/ViewFeedback.aspx?SiteID=99&FeedbackID=252549&wa=wsignin1.0 https://connect.microsoft.com/feedback/ViewFeedback.aspx?SiteID=99&FeedbackID...
Comments are closed.0

Reserving keywords

A couple months ago we asked our MVPs how they felt about reserving keywords in V2.  We received some excellent but mixed feedback, so we’d like to open the discussion up a bit wider. There are keywords we hope to use in a future version of PowerShell, but won’t be implemented in V2.  “class”, “using”, and “new” are ...
Comments are closed.0

Out-GridView Revisited

It has been more than one year since we updated Out-GridView feature with you. In case you are not familiar with Out-GridView yet, it is a unique PowerShell cmdlet that users can pipe command output to a separate window, and it enables users organize and analyze output data easily. The previous blog entry by Brent gave an overview of Out-...
Comments are closed.0