PowerShell Team

Automating the world one-liner at a time…

BizTalk Server Applications: Get/Start/Stop

Tomas Restrepo has a nice script for getting/starting/stoping BizTalk Server Applications at: http://www.winterdom.com/weblog/2006/09/02/BTSResetWithPowerShell.aspx I like how readable it the script is.  It is completely obvious what is going on.  Compare that script with his original C# implementation at: http://www.winterdom.com/...

Background "jobs" and PowerShell

A lot of people have asked whegther Windows PowerShell can do UNIX job handling.  The paraphrase an old management salesperson joke, "YES - YOU can do UNIX job handling with Windows PowerShell" (which means you have to do it yourself).  Jim Truher shows you how in his latest blog entry: http://jtruher.spaces.live.com/...

More Windows PowerShell Training Available

Don Jones, of ScriptingAnswers.com, is holding two two-day classes on Windows administrative scripting in Chicago and Seattle this September. While the first day of each class will focus on advanced VBScript techniques, the second day will be entirely devoted to Windows PowerShell. No prior PowerShell experience is necessary—Don plans to ...

Joel-On-Software on the power of a good language

Joel Spolsky of Joel-On-Software fame, just posted a blog, "Can Your Programming Language Do This?" http://www.joelonsoftware.com/items/2006/08/01.html In this article, he drives home the point that when it comes to code: Maintainability, Readability, Abstraction == Good!  He then points out how languages can help or hinder this and goes ...

ScriptCenter EventLog Article

ScriptCenter has a very good article exploring the use of Windows PowerShell to analyze your eventlogs.  Check it out at: http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/get-eventlog.mspx PSMDTAG:CMDLET: Get-EventLog PSMDTAG:FAQ: EventLog - How do I find out what event logs exist?  ANSWER: Get-EventLog -list ...

Encoding Operations Knowledge

One of the primary goals of Windows PowerShell is to encode operations knowledge.   Consider the example of finding out what domain role a computer plays.  If you look at the WMI class WIN32_COMPUTERSYSTEM, you'll see that it tells you this information:   PS> Get-WMiObject Win32_computerSystem |fl dom*Domain &...

Why do I sometimes get different types?

PSMDTAG:FAQ: Why do I sometimes get different types or different behaviors? PSMDTAG:FAQ: When I pipe a heterogenous set of objects to an cmdlet that expects a homogenous stream - what happens and why? In our newgroup ( Microsoft.public.Windows.PowerShell ), Alex A asked these questions with the following example: cd c:\temp$( gci ; gci hkcu...

Suppressing return values in PowerShell functions

PSMDTAG:FAQ: How do I supress return values in PowerShell functions? This was asked in a newgroup with the clarification: What I mean is:When you call a function Foo that returns a bool, PS will write 'True' or 'False' to the screenby default. Is there anyway to get it to stop writing those return values? Let's illustrate the issue: PS> ...

Casting a scriptblock to an arbitrary delegate signature

Arild asked the following in http://arildf.spaces.msn.com/blog/cns!E99F8B43533149B0!140.entry?_c%3dBlogPart : PSMDTAG:FAQ: Delegates - how to cast a scriptblock to an arbitrary delegate signature? ANSWER - You can't in V1.0. In version 1.0 Windows PowerShell only supports casting scriptblocks to delegates with the ...