Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
316 Part IV: Unleashing the Programmer Within Moving Beyond Simple cmdlets Working with PowerShell commands (cmdlets) can be very powerful but a time comes when you need to do more complex feats that are much like (dare we say it) programming. Relax: PowerShell is built on top of the .NET Framework; thus you have access to a tremendous amount of programming functionality. For example, you can store values in variables, use looping to loop through collections of objects, add logic with if/else statements, and get some specialized functions to do your bidding. If you've worked with a command-line environment before (such as DOS or Unix) then you're familiar with entering commands and getting output back in the form of text that appears on-screen. Well, that's what seems to be going on here, but there's a twist: PowerShell does return text for you to look at -- but that output is really a .NET object. PowerShell simply decides which part of the object makes the most sense to show to you on-screen as text. Saving a value with variables A variable is a place for you to store some value so you can revisit it later.