title: Powershell accessing multiple parameters in a for loop
body: <p>Hi I am very new to powershell and I am writing a script that accepts multiple parameters. These parameters are being accessed in a for loop inside the file.
  It looks something like this</p>
  
  <pre><code>$numOfArgs = args.Length
  for ($i=3; $i -le $numOfArgs; $i++)
  {
  
  
     write-host "folder: $args[$i]"
     # does something with the arguments
  
  }
  </code></pre>
  
  <p>However, the output gives me all the parameters as a whole instead of just one parameter specified in the array as an array element? Can someone tell me where is the mistake here? Thanks!</p>