Showing results for July 2006 - PowerShell Team

Jul 31, 2006
0
0

Why do I sometimes get different types?

PowerShell Team
PowerShell Team

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
1
0

Suppressing return values in PowerShell functions

PowerShell Team
PowerShell Team

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
0
0

Creating arbitrary delegates from scriptblocks in PowerShell…

PowerShell Team
PowerShell Team

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
0
0

Casting a scriptblock to an arbitrary delegate signature

PowerShell Team
PowerShell Team

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
0
0

Issues with Windows PowerShell syntax

PowerShell Team
PowerShell Team

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
0
0

Meet the Exchange Superstars!

PowerShell Team
PowerShell Team

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
0
0

Setting the console title to be your current working directory

PowerShell Team
PowerShell Team

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
Jul 17, 2006
0
0

How to I set the title of my Console Window?

PowerShell Team
PowerShell Team

PSMDTAG:FAQ: How do I set the title of my console window?  ANSWER: $Host.UI.RawUI.WindowTitle = "PowerShell ROCKS" Jeffrey Snover [MSFT]Windows PowerShell/Aspen ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/techn...

FAQ
Jul 15, 2006
0
0

Exchange Management Shell

PowerShell Team
PowerShell Team

Here is a pointer to an Introduction To the Exchange Management Shell:  http://download.microsoft.com/download/6/d/4/6d4b5c51-dd72-41d3-b5b1-9dc22b1d35f1/IntroExchangeMgmtShell.pdf This is a nice glossy view of the important aspects of both Windows PowerShell and Exchange's use of it. PSMDTAG:FAQ: How does the Exchange Management Shell relate ...

FAQ
Jul 15, 2006
0
0

PSMDTAG:FAQ: What is $OFS

PowerShell Team
PowerShell Team

In my blog entry regarding Cascading Type Casts ( http://blogs.msdn.com/powershell/archive/2006/07/15/Cascading_Type_Casts.aspx ) there was an example: PS> [string][char[]][int[]][char[]]"PowerShell" P o w e r S h e l l And in a comment was a question asking why there were spaces between the letters.  The answer is $OFS   PSMDTAG...

FAQENVIRONMENT