Greetings.
I’ve started to study PowerShell a short time ago and already met a wall of lacking of experience. I need some help.
Well, what I exactly can’t do:
I have two text files:
C:\Testing\0zero.txt - which is absolutely blank
C:\Testing\Adresses.txt - which contains next three strings:
11-0002-1
11-0003-1
11-0004-1
What do I need #1:
Copy 0zero.txt file to the \“first string of Adresses.txt”\c$\Testing\
What am I doing #1:
Copy-Item C:\Testing\0zero.txt \\$a.Get(1)\c$\Testing\
But it isn’t work. However
Copy-Item C:\Testing\0zero.txt \11-0002-1\c$\Testing</pre>
works well.What do I need #2:
Copy 0zero.txt file to the adresses which contains all strings from Adresses.txtWhat am I about to do #2 (as #1 is not work I can’t progress further):
for ($i=0; $i -le $a.Count; $i++) {Copy-Item C:\Testing\0zero.txt \\$a.Get($i)\c$\Testing\}Please, tell me what am I doing wrong and how to do it correctly?
And if you have some sources of training (or tasks as above) for “Newbie+”-level please do share it with me.
Thank you in advance.