Skip to Main Content
Microsoft® Windows PowerShell™ Step By Step
book

Microsoft® Windows PowerShell™ Step By Step

by Ed Wilson
May 2007
Beginner content levelBeginner
320 pages
8h 23m
English
Microsoft Press
Content preview from Microsoft® Windows PowerShell™ Step By Step

Looping Through Code

A fundamental concept in any programming language is the use of looping techniques. Because everything in Windows PowerShell is an object, looping techniques not only become much more important but also are inherent in the way you use the scripts. Most of the time, you will not have to stop and think, "Do I need to use a looping technique here?" Rather, it will be intuitive, and you will probably find yourself performing the looping without thinking.

Using the ForEach-Object Cmdlet

If you were tempted to call this the for … each … next statement (as it was called in VBScript), then I have good news for you. In Windows PowerShell, there is no "next" required for the ForEach-Object cmdlet. Therefore, you will never forget to close ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Windows PowerShell™ 3.0 Step by Step

Windows PowerShell™ 3.0 Step by Step

Ed Wilson
Windows PowerShell® 2.0 Bible

Windows PowerShell® 2.0 Bible

Thomas Lee, Karl Mitschke, Mark E. Schill, Tome Tanasovski
Windows Server® 2008 Active Directory® Resource Kit

Windows Server® 2008 Active Directory® Resource Kit

Conan Kezema Stan Riemer Mike Mulcare, Byron Wright, and Microsoft Active Directory

Publisher Resources

ISBN: 9780735623958Catalog PageErrataSupplemental Content