Forum Discussion

charlie4872's avatar
charlie4872
Brass Contributor
Jun 03, 2020
Solved

Using multiple variables against single command

I am working with a loop in a script and am trying to get multiple variables for use in a single command. This is a hard one to verbalize for a Google search so I figured I would try here. The script...
  • VasilMichev's avatar
    Jun 03, 2020

    The script looks OK, although you need to move the $OneDriveUrl part inside the loop (otherwise it will always return the same value).  I would suggest generating a list of individual ODFB URLs first, then combining it with the username in a CSV file. That way you can simply reference the different values via say $_.UserName, $_.OneDriveUrl and so on.

Resources