Posts by this author

Aug 1, 2006
Post comments count0
Post likes count0

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 PSMDTAG:...

FAQGet-EventLog
Aug 1, 2006
Post comments count0
Post likes count0

Scott Hanselman's Beantown.Net presentation

Scott Hanselman is a superstar presenter.  Here is a link to a video of presentation he gave to the Beantown.net users group in boston that focused on Windows PowerShell.  Even if you are a longtime PowerShell user, I encourage you to watch this because Scott provides some great ways to think about things.  http://www.wrox.com/...

Scott Hanselman
Aug 1, 2006
Post comments count0
Post likes count0

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  &...

FAQPHILOSOPHYWMI
Jul 31, 2006
Post comments count0
Post likes count0

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:\ ) | ...

FAQINTERNALTypes
Jul 31, 2006
Post comments count1
Post likes count0

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> functio...

FAQFunctionsReturn Values
Jul 25, 2006
Post comments count0
Post likes count0

Creating arbitrary delegates from scriptblocks in PowerShell…

People have been asking about creating arbitrary delegates out of scriptblocks. As Jeffrey has mentioned, this isn't directly supported in V1.0 of PowerShell. It is, however, possible to do it using dynamic methods and the CreateDelegate call. Here's a script (also attached) that will do it. I haven't tested this very much so it may not work in all...

ScriptBlockDelegates
Jul 24, 2006
Post comments count0
Post likes count0

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 signature: vo...

FAQDOTNETScriptBlock
Jul 23, 2006
Post comments count0
Post likes count0

Issues with Windows PowerShell syntax

REI recently posted some comments/requests about Windows PowerShell syntax at: http://blogs.msdn.com/powershell/archive/2006/04/25/583273.aspx#675133 Let's go through a few of the points. ...the syntax was just way too cryptic and unintuitive. Often it's even dangerous. Like this: #PowerShell's syntax causes dangerous problems generating incorrec...

FAQLANGUAGEPARSER
Jul 22, 2006
Post comments count0
Post likes count0

Meet the Exchange Superstars!

Now you can meet the superstars (Vivek Sharma and Mihai Jalobeanu) behind the Exchange Management Shell in a video interview at:  http://msexchangeteam.com/archive/2006/07/20/428366.aspx You can also get a demo of the Exchange Management Shell (which is Windows PowerShell with Exchange snap-ins) at: http://msexchangeteam.com/archive/2006/07/2...

VideoExchange
Jul 21, 2006
Post comments count0
Post likes count0

Setting the console title to be your current working directory

jmanning wrote: Also, given how common the request is, I'd ask Jeffrey to (pretty-please) also include in this post a prompt function that sets the title to include pwd. Ask and yea shall receive: function Prompt{  $host.ui.RawUI.WindowTitle = $(get-location)  "PS> "} If you want to see a bunch of great prompt examples, check out: h...

FAQSHELLENVIRONMENT