PowerShell Team

Automating the world one-liner at a time…

Outputting vs. Emitting Objects

Sunil wrote: Hello, Firstly i am sorry to post an unrelated question to this post. However i dont know where to post my questions. Here is my questionSay I have 2 cmdlet'sGet-locationGet-serviceWhen I create a test.ps1 file out of these 2 command and then run it, it will always do a Get-service |fl  in the outputIe. A full listing of the ...

Documentation One Liner

I'm constantly amazed and delighted by what people are able to do with a single line of PowerShell. The System Center Virtual Machine Manager (SCVMM) team just released a PowerShell Cmdlet Reference HERE. That is cool – it allows anyone to go take a look at their Cmdlets to either get a better idea for what SCVMM does (or how it does it) ...

Impersonation and Hosting PowerShell

Some of you reported that Impersonation doesn’t work while hosting PowerShell in ASP.net applications.  The problem occurs when PowerShell's pipeline is invoked in the following way from an ASP.NET application:          WindowsIdentity winId = (WindowsIdentity)HttpContext.Current.User....

Controlling WinDbg with PowerShell

Roberto Farah runs a Debugging Toolbox blog and recently got turned onto PowerShell. He has now written a set of PowerShell functions (PowerDbg Library) which allows PowerShell to control WinDbg. The effect is (almost) the same as if WinDbg had embedded PowerShell as its own scripting language. Roberto considered a couple approaches ...

Interview with TechTarget

I recently did an interview with TechTarget here: http://searchwinit.techtarget.com/originalContent/0,289142,sid1_gci1270125,00.html BTW – it was a relatively long interview and the discussion got digested into the article. It is completely accurate but either I misunderstood one question or the digesting process changed the meaning of one...

New and Improved Cmdlet Help Editor Tool

The latest version of the Cmdlet Help Editor has been posted on the same link. It contains a few fixes. I recommend you all upgrade to this version: http://www.wassimfayed.com/PowerShell/CmdletHelpEditor.zip Please let me know if you have any specific questions. Wassim Fayed[MSFT...

Export-Demo

A while ago I wrote a script START-DEMO which I use to give demos (You can get the latest/greatest copy HERE. ) This script is also a great teaching tool. You can create your own demo.txt file with commands and explanations and then people can run it using Start-Demo. The great things about this are: Our test manager Michael Naixin Li ...

Monitoring with PowerShell and Appropriate Technology

Otto Helweg has a cool blog entry about how he uses PowerShell to monitor Web Sites HERE. This isn't a professional product but there are a couple of websites that he cares about and this quick and easy script tells him what he needs to know. It monitors a set of websites, looks for content to validate the page and then logs results and send ...

Show-WmiClass

Here is a script that I use to show WMI classes. I think you'll find it useful. There is an example after the script: ############################################################################# Show-WmiClass - Show WMI classes# Author: Microsoft# Version: 1.0# NOTE: Notice that this is uses the verb SHOW vs GET. That is because it# combines...

Out-*/Format-*

Don Jones has graciously offered to share a slide he uses as part of his Windows PowerShell Fundamentals course (http://www.scriptingtraining.com/ ) which shows the interaction between the pipeline, the out-* and format-* cmdlets. The attached slide illustrates how (sometimes) a picture is worth a thousand words.  Don has a great way of ...