Home Whiteboard Graphing Calculator Online Compilers Articles Tools

Explore Categories

Find the perfect tutorial for your learning journey

Python TechnologiesDatabasesComputer ProgrammingWeb DevelopmentJava TechnologiesComputer ScienceMobile DevelopmentBig Data & AnalyticsMicrosoft TechnologiesDevOpsLatest TechnologiesMachine LearningDigital MarketingSoftware QualityManagement Tutorials View All Categories
Tutorials Courses Jobs Login
PowerShell Tutorial
  • PowerShell - Home
  • PowerShell - Overview
  • PowerShell - Environment Setup
  • PowerShell - Cmdlets
  • PowerShell - Files and Folders
  • PowerShell - Dates and Timers
  • PowerShell - Files I/O
  • PowerShell - Advanced Cmdlets
  • PowerShell - Scripting
  • PowerShell - Special Variables
  • PowerShell - Operators
  • PowerShell - Looping
  • PowerShell - Conditions
  • PowerShell - Array
  • PowerShell - Hashtables
  • PowerShell - Regex
  • PowerShell - Backtick
  • PowerShell - Brackets
  • PowerShell - Alias
  • PowerShell Useful Resources
  • PowerShell - Quick Guide
  • PowerShell - Useful Resources
  • PowerShell - Discussion
Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Online Resume Builder
  • HR Interview Questions
  • Computer Glossary
  • Who is Who
Home Powershell Powershell - While Loop

Powershell - While Loop



Previous
Quiz
Next

The following scripts demonstrates the while loop.

> $array = @("item1", "item2", "item3")
$counter = 0;

while($counter -lt $array.length){
   $array[$counter]
   $counter += 1
}
 
item1
item2
item3
powershell_looping.htm
Previous Quiz Next
Advertisements
  • ABOUT US
  • OUR TEAM
  • CAREERS
  • JOBS
  • CONTACT US
  • TERMS OF USE
  • PRIVACY POLICY
  • REFUND POLICY
  • COOKIES POLICY
  • FAQ'S
tutorials point logo
Download Android App Download IOS App

Tutorials Point is a leading Ed Tech company striving to provide the best learning material on technical and non-technical subjects.

Copyright 2026. All Rights Reserved.