Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » FAQ » INTERNAL   (RSS)

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
Posted by PowerShellTeam | 1 Comments
Filed under: ,

Indirectly Invoking Methods Via Variablenames

PSMDTAG:FAQ: Can I specify a methodname using a variable? e.g. $x.$y() PSMDTAG:FAQ: Why do I get METHOD metadata when I specify a method without providing parentheses? One of the great things about Windows PowerShell is that it is a latebound language
Posted by PowerShellTeam | 3 Comments
Filed under: , ,

Are ScriptBlock parameters implemented for functions?

PSMDTAG:FAQ: Are ScriptBlock parameters implemented for functions? Not in V1. Functions do not use the same parameter binding mechanism as Cmdlets. This is something we intent to address in a future release. -- Jeffrey Snover [MSFT] Windows PowerShell
Posted by PowerShellTeam | 0 Comments
Filed under: ,

Flexible pipelining with ScriptBlock Parameters

PSMDTAG:FAQ: How can I pipeline data to a parameter which does not accept pipeline input? PSMDTAG:FAQ: What are ScriptBlock Parameters? One of the foundation concepts of Windows PowerShell is pipelining objects instead of text. What happens is that when
Posted by PowerShellTeam | 10 Comments
Filed under: , ,

More - How does PowerShell formatting really work?

<Edited 7/2/2006 with tags and categories> PSMDTAG:FAQ: Why doesn't output expand when I expand the width of the console? PSMDTAG:FAQ: Why doesn't output expand when I use -noElements on GROUP? Consider the example: PS> gps |group company Count

Programmatic way to get valid string values for a parameter

<WIZARD WARNING> ISVs and Tool vendors may find this important, Advanced users may find this interesting, Casual users may want to skip this. Someone asked me if there was a programmatic way to tell what the legal values for a string parameter to
Posted by PowerShellTeam | 1 Comments
Filed under: , ,

Invoking PowerShell with complex expressions using Scriptblocks

<WIZARD WARNING> First a reminder: when you are in PowerShell (formerly knows as Monad), you can run anything you want out-of-process using the construct: PowerShell {Scriptblock} The great example of this is PS> #RUN EVERYTHING IN PROCESS PS>
Posted by PowerShellTeam | 7 Comments
Filed under: ,

The new TabExpansion feature...

One of the nicest new features in the latest drop of Windows PowerShell is enhanced tab-completion. We now tab-complete properties on variables and parameters on cmdlets in addition to the old filename completion. But that's not the interesting part.
Posted by PowerShellTeam | 13 Comments
Filed under: , ,

Finding out what determines which properties are displayed

MoW, a Monad newsgroup regular, asked why only the Caption, Name and PeakUsage properties were displayed from the command “get-WMIObject Win32_PageFileUsage” while the output object had a lot more properties. I think it is worth it to explain in details

Is it safe to use ALIASES in scripts?

In our newsgroup (Microsoft.Public.Windows.Server.Scripting) , Mark Ayers asked the question: > Shouldn't best practice for scripts be full command name? The answer is YES, NO, and MAYBE. YES - Full names provide the most readable experience for scripts.
Posted by PowerShellTeam | 1 Comments
Filed under: , ,

How does Select-String work with Pipelines of objects?

<Edited to convert Match-String to Select-String 7/9/2006> In our newsgroup (Microsoft.Public.Windows.Server.Scripting) , Vasu asked about how Select-string works in pipelines: Here is what I observe: 1. MSH C:\> get-alias ..truncated.. Alias
 
Page view tracker