Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Need help understanding and fixing a script

$
0
0

Well, I have been trying to create a script that will do the following:

  • Import IPAddress’ from a CSV file into an array
  • Perform 4 copy-item commands to each of the IPAddress’ within the array

So far I have been working with trying to list them, to no success.

$File=Import-csv C:\IP.csv

$foreach ($IPin$File)

   {

       Write-output $IP

   }

 

I get all of the script (apart from it doesn't work) other then the For each IP in File, IP has never been specified so how could the script know what to do? Could anyone lend me a hand here?


Regards Justin Looper | Microsoft Certified Professional




Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>