Showing results for FAQ - PowerShell Team

Jun 23, 2006
Post comments count0
Post likes count0

Flexible pipelining with ScriptBlock Parameters

PowerShell Team
PowerShell Team

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 an upstream command generates an object, the PowerShell engine examines the data requiremen...

FAQPHILOSOPHYINTERNAL
Jun 21, 2006
Post comments count0
Post likes count0

More – How does PowerShell formatting really work?

PowerShell Team
PowerShell Team

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

FAQPHILOSOPHYINTERNAL
Jun 21, 2006
Post comments count0
Post likes count0

$ERRORVIEW="CATEGORYVIEW"

PowerShell Team
PowerShell Team

<Edited 7/2/2006 with tags and categories>PSMDTAG:FAQ: What is $ErrorView?PSMDTAG:FAQ: How do I get error details? Have you tried out $ErrorView="CategoryView" yet?  Remember -  errors are just objects.  Given that they are objects, we render a subset of their properties to the console.  We provide 2 views: Normal an...

FAQPHILOSOPHYERROR
Jun 16, 2006
Post comments count0
Post likes count0

Using Format Control Strings.

PowerShell Team
PowerShell Team

PSMDTAG:FAQ: How do I display large numbers with commas?PSMDTAG:FAQ: How do I use .NET formatting strings? As scripters, we often spend tons of times trying to get our data formated just the right way.  Often this is an error-prone, frustrating experience.  Windows PowerShell leverages .NET objects to make this task a ton simpler.  I...

FAQDOTNET
May 9, 2006
Post comments count2
Post likes count0

Programmatic way to get valid string values for a parameter

PowerShell Team
PowerShell Team

<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 a cmdlet was.  The example was OUT-FILE -ENCODING xxx Out current help doesn't te...

FAQPHILOSOPHYINTERNAL
May 8, 2006
Post comments count0
Post likes count0

Filing Bugs

PowerShell Team
PowerShell Team

With the release of RC1 of PowerShell, we've closed down on doing much feature work and are primarily polishing the product. This means fixing bugs, cleaning up usability issues, and really making sure this is a quality product. For those of you unfamiliar with Microsoft's milestone naming terminology, RC1 stands for Release Candidate 1. This means...

FAQ
May 7, 2006
Post comments count0
Post likes count0

Invoking PowerShell with complex expressions using Scriptblocks

PowerShell Team
PowerShell Team

<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 PROCESSPS> get-process |where {$_.handles -ge 900} |sort handles Handles  NPM(K)  &n...

FAQINTERNAL
May 2, 2006
Post comments count0
Post likes count0

em dash, en dash, dash, dash, dash…

PowerShell Team
PowerShell Team

Some people have noticed that you can paste examples out of Word documents directly into a PowerShell session. Given all of the typographic tricks that Word does, this is actually much harder than it sounds. Here’s what we do. There's a piece of code in the interpreter that takes each of the possible characters and maps it into the canonical repre...

FAQPARSER
Apr 26, 2006
Post comments count0
Post likes count0

The new TabExpansion feature…

PowerShell Team
PowerShell Team

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. The cool bit is that it's done through a user-definable function. In the same way that you can rede...

FAQSHELL
Apr 25, 2006
Post comments count0
Post likes count1

How to Access or Modify StartUp Items in the Window Registry

PowerShell Team
PowerShell Team

Some applications launch themselves whenever you start your computer and load Windows.  In most cases, this is the desired behavior.  However in some instances, malicious programs such as spyware, Trojans, worms, viruses load in this manner and hijack your computer. It is important to stay vigilant and periodically monitor your startup...

FAQ